Download presentation
Presentation is loading. Please wait.
Published byMarianna King Modified over 8 years ago
1
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 8 Linux on the Desktop McGraw-Hill
2
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 2 Learning Outcomes Describe Linux Install Linux Demonstrate basic skills for using Linux Manage Linux files and directories with shell commands Secure a Linux desktop Troubleshoot common Linux problems
3
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 3 Linux Overview Why Learn Linux? – Qualifying for a Job – Improving Your Skills
4
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 4 Linux Overview The Evolution of Linux – Ken Thompson of Bell Labs wrote an operating system in the 1970's that evolved into UNIX – UNIX went on to power the computers of most of the universities, corporations, and governments of the world – UNIX has a reputation as a powerful, stable, and fast system – 1984: GNU formed to develop a free version of a UNIX-like OS
5
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 5 Linux Overview The Evolution of Linux (cont.) – 1988: UNIX licensees formed the Open System Foundation (OSF) – AT&T and others formed UNIX International to oppose OSF – 1991: Linus Torvalds and others began development of Linux as an open-source operating system based on UNIX – Open source software is distributed with all its source code
6
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 6 Linux Overview Linux Today – Novell and IBM (and others) have integrated open source software into their product mix – Manufacturers sell Web servers running Apache Web Server on Linux – Linux now on computers ranging from desktops to corporate servers
7
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 7 Linux Overview Features and Benefits of Linux – Free or Inexpensive – Runs on Old Equipment – Fast – Command line only or add a GUI – Stable – Secure – Open Source
8
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 8 Linux Overview Drawbacks of Linux – Lack of Centralized Support – Limited Software Selection – Limited Hardware Support – Complexity
9
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 9 Linux Overview Acquiring Linux for the Desktop – Many sources: select by role Server or desktop? Select a source that meets your support needs Desktop Linux sources – Ubuntu (www.ubuntu.com) – Fedora (fedoraproject.org) – OpenSUSE (www.opensuse.org)
10
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 10 Linux Overview Acquiring Linux for the Desktop – Ubuntu Download includes a LiveCD distribution Complete software bundle – OpenOffice – Firefox Up to 700 MB download
11
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 11 Step-by-Step 8.01 Downloading Linux and Creating a LiveCD Linux Overview
12
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 12 Installing Linux Preparing for Linux Installation – Keep Your Linux Installation Simple – Prepare a Password – Hardware Requirements – Clean Installation versus Dual Booting – Booting into the Linux Installation Program
13
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 13 Table 8-1 Ubuntu Linux Minimum Requirements versus Recommended System Configuration
14
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 14 Installing Linux Performing the Installation – Boot into Linux installation – Guides you through process – Ubuntu GUI installation include online help
15
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 15 Step-by-Step 8.02 Installing Linux
16
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 16 Linux Basics Logging in to Linux – Linux requires authentication of each user – Command-line login at login prompt Name of computer, followed by a space and the word login, followed by a colon and a blinking cursor Enter user name Prompt asks for password Type password After successful login, last login information displays, followed by the standard command-line prompt
17
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 17 Figure 8-1 The Login prompt
18
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 18 Figure 8-2 The $ prompt shows user name, computer name, and current directory
19
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 19 Linux Basics Logging in to Linux – The Linux CLI prompt Your user name and the computer name (hostname) separated by an @ sign followed by your user name again Contained within square brackets followed by a $ sign The $ prompt Root account has a # sign at end of prompt
20
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 20 Linux Basics Logging in to Linux – Log out Type Exit or Press Ctrl-D
21
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 21 Linux Basics Shutting Down Linux – Only root can shut down Linux from CLI Type shutdown -h now Type shutdown -r now Learn more: type man shutdown – Ordinary user can shutdown in Linux GUI Select Log Out | Shutdown Root can disable this feature in the GUI
22
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 22 Linux Basics The Ubuntu GNOME Terminal Window – Terminal window equivalent to a Windows Command Prompt window – Open from the GNOME Applications menu
23
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 23
24
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 24 Figure 8-3 A GNOME terminal window
25
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 25 Linux Basics Working with Linux Commands – The Command Line Interface Shell BASH, an acronym for Bourne Again Shell Shell commands
26
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 26 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) The Command Syntax – The first string of characters is the command – A space follows the command – Options follow – In general the syntax is: command –switch parameter – Example: ls –a /etc
27
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 27 Figure 8-4 Entering this command in all caps resulted in an error message
28
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 28 Figure 8-5 Entering the previous command in lowercase resulted in running the correct command, showing the user manual entry for the ls command
29
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 29 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) Command Line History – Linux saves shell commands entered during a session – Scroll through the commands at the $ prompt – Move within a command to edit it – Press Enter to run a command – Command history saved a file called bash_history
30
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 30 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) Command Completion – A feature that completes a command line – Enter portion of a command and press the Tab key – Linux will try to guess the remaining portion
31
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 31 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) The Help Manual – Online manual accessed with man command – Syntax: man command – Enter man man to see documentation for the man command – Page Down and Page Up to scroll one screen at a time – Up Arrow and Down Arrow to scroll one line at a time
32
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 32 Figure 8-6 The manual command documentation
33
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 33 The date and cal commands
34
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 34 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) Use of Spaces – Separate each part of a command line entry with a space – Example that won’t work » shutdown-h now
35
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 35 Figure 8-7 Example of a BASH error for an unrecognized command
36
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 36 Figure 8-8 An unrecognized command in a GNOME terminal window
37
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 37 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) Paths – No drive letter – Path begins with a forward slash (/) which also separates directories – Drives and other devices are given names, such as /dev/sda0 (the first hard drive on a SCSI interface) or /dev/hda1 (the first hard drive on an IDE interface)
38
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 38 Linux Basics Working with Linux Commands – The Command Line Interface Shell (cont.) Linux Feedback – Similar to DOS and Windows shell commands – Cryptic feedback – Success of a command not usually reported – Only errors – Output minimal and controlled by options » Example: ls -l
39
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 39 Figure 8-9 Linux error messages are not very helpful
40
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 40 Figure 8-10 Output from the ls and ls –l commands
41
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 41 Managing Files and Directories with Shell Commands Working with Directories in Linux – Linux Directory Hierarchy A home directory for each user – /home/user name – User has full control over contents of the home directory – Becomes current at login Predefined directories used by the system – /etc – /bin
42
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 42 Table 8-2 Linux Default Directories
43
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 43 Table 8-3 Basic Shell Commands for File Management
44
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 44 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Listing the Contents of a Directory Simple Directory Listings: ls Fancy Directory Listings: ls –l /etc
45
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 45 Table 8-4 Commonly Used Options for the ls Command
46
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 46 Figure 8-11 File listing of the /etc directory
47
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 47 Figure 8-12 File listing with more details
48
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 48 Figure 8-13 A listing with all entries displayed
49
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 49 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Changing the Current Directory cd command cd private cd /usr/sbin
50
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 50 Figure 8-14 Changing directories Figure 8-15 Changing back to a home directory using the tilde (~)
51
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 51 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Relative Path Move up one directory level: cd.. Move back to current user’s home directory: cd ~ Move up two levels and : cd../../etc
52
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 52 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Wildcards Symbols that replace one or more characters – * : bi* refers to all files or directories beginning with "bi“ – Enter a range of characters to be substituted as wildcards » ls [c-d]* lists all files beginning with c through d – $ represents a single character
53
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 53 Using wildcards
54
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 54 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Creating Directories Use the mkdir command Requires at least the name of the directory Example: mkdir junk Verify success using the ls command Create several directories at once mkdir perl html bin data
55
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 55 Figure 8-16 Using mkdir to create directories and ls to show them
56
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 56 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Copying Files in Linux cp is Linux copy command Requires two parameters – Source file – Target filename or location – Can use relative path and wildcards
57
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 57 Figure 8-17 Copying the ntp.conf file
58
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 58 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Creating and Editing Files in Linux Using Pico – Commands shown at bottom of the screen – Keyboard works as expected (especially backspace and delete keys) – Text wraps after 80 characters – ctrl-t opens spell checker
59
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 59 Table 8-5 Common Pico Commands
60
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 60 Figure 8-18 The Pico editor with an open document
61
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 61 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – The Vi/Vim Text Editor Line editor Latest, Vi Improved (VIM) Voted the most popular Linux editor by www.thegeekstuff.com readers
62
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 62 Figure 8-19 The Vim user interface with a document open
63
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 63 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – The Emacs Text Editor Voted a distant second to Vim at www.thegeekstuff.com Designed for programmers
64
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 64 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Deleting Files in Linux rm command – Requires at least one parameter: a file name – Include multiple file names to delete more than one – Use the ls command to confirm a deletion
65
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 65 Figure 8-20 Using the rm command to delete a file
66
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 66 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Renaming or Moving Files in Linux mv command – Name of original file – New name or location of file
67
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 67 Renaming a file with the mv command
68
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 68 Managing Files and Directories with Shell Commands Working with Directories in Linux (cont.) – Viewing the Contents of a File Several commands for viewing text files If used on binary files, they display “garbage” more command displays file one screenful at a time head command displays just the first 10 lines of a file less command moves forward or backward tail command displays the last 10 lines of a file cat command displays the entire contents
69
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 69 Figure 8-21 Using the more command
70
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 70 Securing a Linux Desktop Using the Root Account – Create a strong password – Root is also called superuser in some Linux references
71
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 71 Figure 8-22 After logging on as the root the # prompt displays
72
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 72 Securing a Linux Desktop Performing Administrative Tasks at the Command Shell or Terminal Window – While logged on as an ordinary user, enter su root This substitutes the root user temporarily Only change to prompt is the ending #
73
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 73 Securing a Linux Desktop Performing Administrative Tasks at the Command Shell or Terminal Window (cont.) – Ubuntu includes sudo Logged on user borrows root privileges Works like a Windows standard account with UAC enabled Example: sudo pico – User enters their own password – Command completes gksudo is GNOME version of sudo
74
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 74 The sudo command prompts for a password before executing a command
75
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 75 Figure 8-23 The gksudo command prompts you for the password of the current user—not the root account
76
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 76 Securing a Linux Desktop Performing Administrative Tasks at the Command Shell or Terminal Window (cont.) – Performing Administrative Tasks in a GUI While logged on as an ordinary user, enter a command that requires root A dialog box will prompt for your password
77
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 77 8-24 Supply your password to perform an administrative task
78
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 78 Securing a Linux Desktop Managing Users – Several users can use one computer – Each user must have a unique account – Creates a home directory for each user – Users can further protect home directory with permissions
79
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 79 Table 8-6 Shell Commands for User Management
80
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 80 Figure 8-25 A GUI tool for user management
81
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 81 Securing a Linux Desktop Managing Users (cont.) – Creating User Accounts Each name must be unique Determine a naming convention Create a user with useradd Confirm account with the finger command
82
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 82 Installing the finger daemon
83
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 83 Figure 8-26 Using the useradd command to create a user
84
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 84 Securing a Linux Desktop Managing Users (cont.) – Changing User Passwords Change passwords with passwd Entering passwd without parameters will allow you to change your own password The root account can change any account's password – passwd username Linux will only accept complex passwords
85
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 85 Figure 8-27 Using root to change another account’s password
86
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 86 Securing a Linux Desktop Managing Users (cont.) – Deleting Users Delete users with userdel – userdel username Home directory not removed when user is deleted Manually delete this directory and its contents
87
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 87 Securing a Linux Desktop File and Folder Permissions – File and Folder Attributes Run ls –l to see the attributes First 10 characters 1 st character: file (-), directory (d), or link (l) Next 9 are permissions for three different entities 2 nd, 3 rd, and 4 th show permissions of owner 5 th, 6 th, and 7 th show permissions of group 8 th, 9 th, and 10 th show permissions of all others
88
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 88 Figure 8-28 A sample listing showing attributes
89
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 89 Securing a Linux Desktop File and Folder Permissions – Permissions r = read w = write x = execute - = disabled – Permission mode values read = 4 write = 2 execute = 1
90
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 90 Securing a Linux Desktop File and Folder Permissions – Change permissions with chmod Requires two parameters – Access mode number – File or directory name to change – Example: chmod 644 reports
91
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 91 Table 8-7 Access Mode Numbers
92
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 92 Step-by-Step 8.03 Working with Directories Securing a Linux Desktop
93
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 93 Troubleshooting Common Linux Problems Cannot Save File – Usually result of trying to save a file in a location outside the user's home directory – Direct the application to save the file in a location within the user's directory
94
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 94 Figure 8-29 Error screen in an application indicating trouble saving a file
95
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 95 Troubleshooting Common Linux Problems Screen Displays Gibberish – Usually result of trying to view nontext data as text – Example: cat a.out The a.out file is binary, so the output is gibberish – If problem persists after output is complete, log out and log in again
96
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 96 Figure 8-30 Results of entering a head command for a.out
97
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 97 Troubleshooting Common Linux Problems Command Not Found Error – Number one cause is typos – Review command-line history – Use the Left Arrow and Right Arrow keys to move through the line and correct error – Press Enter to test correction
98
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 98 Chapter 8 Summary Linux Overview – Linux, originally created by Linus Torvalds, is free, open source software that is like UNIX in stability and function. – Many versions of Linux exist for all types of computers, and people often use Linux on Web servers.
99
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 99 Chapter 8 Summary Linux Overview (cont.) – Linux benefits include cost (it is free or inexpensively bundled), the ability to run on old hardware, speed, and stability. – Drawbacks of Linux include lack of centralized support, limited software selection, limited hardware support, and complexity.
100
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 100 Chapter 8 Summary Installing Linux – Decide how to install—clean installation, upgrade, or dual boot. Keep the installation simple and fine-tune it later, especially as far as undetected devices go. – Linux memory and hard disk space requirements are small compared to Windows operating systems.
101
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 101 Chapter 8 Summary Installing Linux (cont.) – Linux supports all standard video graphics adapters and monitors; supports the use of a mouse, primarily in graphics interfaces; and supports many printers, modems, and network adapters.
102
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 102 Chapter 8 Summary Installing Linux (cont.) – Be prepared to work with the root account (superuser) before installing Linux; give this account a strong password, and only use it when you need to perform system maintenance tasks. – Many Linux installation programs now run in GUI mode, providing online help in a pane on screen throughout the process.
103
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 103 Chapter 8 Summary Linux Basics – Linux requires authentication via a login— either in the command shell or in a GUI. – The Linux shell is called BASH. – The $ (dollar) prompt appears when an ordinary user logs in to the command shell. It consists of the user name and the computer name (host name) separated by an @ sign, followed again by the user name (this last indicates the name of the current directory).
104
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 104 Chapter 8 Summary Linux Basics (cont.) – When the root account logs in at the command shell, the prompt is similar, but ends with a # sign. – Log out of Linux by typing exit at the prompt, which allows you to leave Linux without shutting down. – Only root can shut down Linux from the command line. You accomplish this with the shutdown command, which has many options (that change the outcome of a command).
105
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 105 Chapter 8 Summary Linux Basics (cont.) – Linux is case sensitive, while DOS and the Windows command prompt are case insensitive. – An option is a subcommand that changes the outcome of a command. Many options are preceded by a hyphen (-). – Linux requires that you separate each part of a command line entry with a space.
106
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 106 Chapter 8 Summary Linux Basics (cont.) – In DOS, a full path to a file or directory begins with a drive letter, but Linux does not use drive letters. – Linux shows each device as part of the file system as in /dev/sda0 (the first hard drive on a SCSI interface). – The man command gives you access to the Linux shell commands help manual.
107
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 107 Chapter 8 Summary Managing Files and Directories with Shell Commands – Linux has several directories for system files and a home directory for each user. – Your home directory is the only place you can save files, and when you log in this directory becomes your current (or working) directory. – The /bin directory within your home directory contains many of the Linux commands.
108
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 108 Chapter 8 Summary Managing Files and Directories with Shell Commands (cont.) – The /etc directory contains settings and configuration data for your Linux computer. There are many other directories created for the system’s use, and an ordinary user cannot access these directories. – You use the ls, cd, more, mkdir, cp, rm, and mv commands in file management. – You can use the, head, less, tail, and cat commands to view files.
109
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 109 Chapter 8 Summary Managing Files and Directories with Shell Commands (cont.) – You can use special symbols with the shell commands to navigate to directories that are relative to your current directory. – Use the asterisk (*) wildcard to replace all the characters from the point where you place the asterisk to the end of the name. Use square brackets with the asterisk to include a range of characters to precede the wildcard.
110
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 110 Chapter 8 Summary Managing Files and Directories with Shell Commands (cont.) – A text editor works with plain text. Pico, Vi, Vim, and Emacs are text editors that come with some distributions of Linux.
111
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 111 Chapter 8 Summary Securing a Linux Desktop – You must use the root account to create and manage users, and to make system changes. – When logged on as an ordinary user, use the su command to log on as another user (most often root). – When logged on as an ordinary user in a GUI, any time you attempt to perform a root-only function you will automatically be prompted to provide the root password.
112
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 112 Chapter 8 Summary Securing a Linux Desktop – Common commands for working with user accounts are useradd, userdel, passwd, and finger. – Use permission attributes on files and folders to control access to them. – The permissions include: r (read), w (write), x (execute), and - (disabled).
113
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 113 Chapter 8 Summary Securing a Linux Desktop – Use the chmod command to modify attributes, based on mode number. – Permission attribute modes are 1 (execute), 2 (write), and 4 (read).
114
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 114 Chapter 8 Summary Troubleshoot Common Linux Problems – You must have permission to save a file in a directory. – Trying to display a binary file results in garbage on the screen. – The “Command Not Found Error” usually results from a typo at the command prompt.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.