OEL120 Oracle Linux
Total Page:16
File Type:pdf, Size:1020Kb
Oracle Linux: Linux Fundamentals Electronic Presentation D49360GC20 Edition 2.0 February 2011 ® Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use consti"fi"ditutes "fair use" under copyr ihlight law, you may not use, s hdldldhare, download, upload, copy, pr idilfint, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error- free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U. S. Government contract . Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Guru Labs L.C. The contents of this course and all its modules and related materials, including handouts to audience members, are copyright ©2011 Guru Labs L.C. No part of this publication maybe stored in a retrieval system, transmitted or reproduced in anyway, including, but not limited to, photocopy, photograph, magnetic, electronic or other record, with out the prior written permission of Guru Labs. This curriculum contains proprietary information which is for the exclusive use of customers of Guru Labs L. C., and is not to be shared with personnel other than those in attendance at this course. This instructional program, including all material provided herein, is supplied without any guarantees from Guru Labs L.C. Guru Labs L.C. assumes no liability for damages or legal action arising from the use or misuse of contents or details contained herein. Photocopying any part of this manual without prior written consent of Guru Labs L.C. is a violation of federal law. This manual should not appear to be a photocopy. If you believe that Guru Labs training materials are being photocopied without permission, please email [email protected] or call 1-801-298-5227. Guru Labs L.C. accepts no liability for any claims, demands, losses, damages, costs or expenses suffered or incurred howsoever arising from or in connection with the use of this courseware. All trademarks are the property of their respective owners. Version: OEL120S-O54-A00 Oracle Linux: Linux Fundamentals Version: OEL120-O54-A00 Chapter Numbers & Titles 1 What is Linux? 2 Multi-user Concepts 3 The X Window System 4 The Linux Filesystem 5 Manipulating Files 6 Archiving and Compression 7 Shell Basics 8 Command Shells 9 Shell Scripting for DBAs 10 Process Management and Job Control 11 Regular Expressions 12 Text Processing 13 Text Editing 14 The Secure Shell (SSH) 15 Intro to Software Management 16 Messaging 17 Printing Schedule: y Class start and end times y Lunch and other breaks Training Facility Information: y Restrooms y Telephone and network access y Break rooms and other resources y Emergency procedures Participant Introductions: y Name and employer y Background and relevant experience y Objectives and topics of interest Typographic Conventions: The number The letter Keys pressed at the same time. "zero". "oh". The number The letter Keys pressed in sequence. "one". "ell". Line Wrapping: password required /lib/security/pam_cracklib.so retry=3a File: /etc/ssh/sshd_config type= minlen=12 dcredit=2 ucredit=2 lcredit=0 ocredit=2 #LoginGraceTime 2m password required /lib/security/pam_unix.so use_authtok - #PermitRootLogin yes + PermitRootLogin no Representing File Edits: + AllowUsers sjansen #StrictModes yes password required /lib/security/pam_cracklib.so retry=3a File: /etc/ssh/sshd_config type= minlen=12 dcredit=2 ucredit=2 lcredit=0 ocredit=2 #LoginGraceTime 2m password required /lib/security/pam_unix.so use_authtok - #PermitRootLogin yes + PermitRootLogin no + AllowUsers sjansen #StrictModes yes Lab Conventions Distribution Specific Information Action Lists This courseware is designed to support multiple Linux distributions. Some lab steps consist of a list of conceptually related actions. A When there are minor differences between the enterprise and enthusiast description of each action and its effect is shown to the right or under distributions, the enterprise distributions are preferred for examples, the action. Alternating actions are shaded to aid readability. For example, screenshots, etc. When the differences are more significant, each version the following action list describes one possible way to launch and use is labeled appropriately. The following base strings are used to represent xkill to kill a graphical application: the distributions supported by this courseware: Action Lists: Ô¿Å Open the "run" dialog. RHEL ⇒ Red Hat Enterprise Linux FC ⇒ Fedora Core xkillÕ Launch xkill. The cursor should change, SLES ⇒ SUSE Linux Enterprise Server usually to a skull and crossbones. SL ⇒ SUSE Linux Click on a window of the application to kill. Indicate which process to kill by clicking on The specific supported version is appended to the base distribution it. All of the application’s windows should strings, so for Red Hat Enterprise Linux version 5 the complete string disappear. is: RHEL5. Certain lab tasks are designed to be completed on only a sub-set of the Callouts supported Linux distributions. If the distribution that you are using is not shown in the list of supported distributions for the lab task, then you Occasionally lab steps will feature a shaded line that extends to a note should simply skip that task. in the right margin. This note, referred to as a "callout", is used to provide additional commentary. This commentary is never necessary to complete Certain lab steps are only to be performed on a sub-set of the supported the lab succesfully, and could in theory be ignored. However, callouts Linux distributions. In this case, the step will start with a standardized do provide valuable information such as: insight into why a particular string that indicates which distributions the step should be performed on. command or option is being used, the meaning of less obvious command When completing lab tasks, skip any steps that do not list your chosen output, and tips or tricks such as alternate ways of accomplishing the task distribution. For example: at hand. [SLES9] $ sux - On SUSE, the sux command 1) This step should only be performed on FC3 and RHEL4. Password: password copies the MIT-MAGIC-COOKIE-1 Because of a bug in RHEL4's and FC3's Japanese fonts... # xclock so that graphical applications can be run after switching Sometimes commands or command output is distribution specific. In to another user account. The these cases, the matching distribution string will be shown to the left of normal su command does the command or output. For example: not do this. $ grep -i linux /etc/*-release | cut -d: -f2 [RHEL4] Red Hat Enterprise Linux ES release 4 (Nahant) [SLES9] SUSE LINUX Enterprise Server 9 (i586) vi Lab Conventions Lab Conventions Lab Task Headers Variable Data Substitutions Truncated Command Examples Every lab task begins with three standard informational headers: In some lab tasks, students are required to replace portions of commands Command output is occasionally omitted or truncated in examples. There are two type of omissions: "Objectives", "Requirements" and "Relevance". Some tasks also include with variable data. Variable substitution are represented using italic fonts. complete or partial. a "Notices" section. Each section has a distinct purpose. For example, X and Y. Sometimes the existence of a command’s output, and not its content, is all that matters. Other times, a Objectivescommand’s⇒ outputAn outline is too of variable what will to be reliably accomplished represent. in Inthe both lab task. cases, whenSubstitutions a command are used should most produce often in lab tasks requiring more than one Requirementsoutput, but an example⇒ A list of of that requirements output is not for provided, the task. the For following example, formatcomputer. is used: For example, if a student on station4 were working with a whether it must be performed in the graphical environment, or student on station2, the lab task would refer to stationX and stationY whether$ cat multiple/etc/passwd computers are needed for the lab task. Relevance. ⇒outputA brief omitted example . of. how. concepts presented in the lab stationX$ ssh root@stationY task might be applied in the real world. and each would be responsible for interpreting the X and Y as 4 and 2. NoticesIn general,⇒ atSpecial least a information partial output or warningsexample isneeded includedto after successfully commands. When example output has been trimmedcomplete to include the lab task. only For certain example, lines, unusual the following prerequisites format or is common used: station4$ ssh root@station2 sources of difficulty. $ cat /etc/passwd Commandroot:x:0:0:root:/root:/bin/bash Prompts Truncated Command Examples . snip . In orderclints:x:500:500:Clint to save space, the command Savage:/home/clints:/bin/zsh prompts shown in examples have Command output is occasionally omitted or truncated in examples. There been condensed. snip to . either . "$" or "#". Commands with a $ prompt should are two type of omissions: complete or partial. be run as a normal user like guru or visitor. Commands with a # prompt shouldAction beLists run as the root user.