• Save
Survey of Operating Systems Ch 08
Upcoming SlideShare
Loading in...5
×
 

Survey of Operating Systems Ch 08

on

  • 2,381 views

 

Statistics

Views

Total Views
2,381
Views on SlideShare
2,376
Embed Views
5

Actions

Likes
3
Downloads
0
Comments
0

1 Embed 5

http://richmondcc.blackboard.com 5

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Ask students to discuss the double-edged sword of open-source software. Are the benefits worth the risks? Ask students to consider whether Microsoft or Apple OSs are more secure from malicious action because of their “closed-source” approach.
  • Help students understand just how revolutionary a concept an essentially free, continuously improved, OS is. As they progress through the chapter, ask them to consider reasons why Linux should become an acceptable alternative to competing OSs and reasons why this conversion has been slow to occur. Can they see a strategy that would allow Linux to find greater acceptance faster than it has to date in the corporate world?
  • Ask students if they think Linux is more complex than Windows or Mac OS X. Actually, Linux is not any more complex than Windows or Mac OS X (arguably its cousin). However, the traditional Windows and Mac OS GUIs hide the complexities of those OSs. Working with Linux with the latest GNOME is a similar experience.
  • If 700 MB is too large for downloading during the exercise, consider downloading it before class and making it available on a server on the LAN. It is well worth the effort.
  • Step-by-Step 8.01 Downloading Linux and Creating a LiveCD Be sure to test this lab before class, and if you are making the distribution available locally, give the students the instructions for locating it on the network. If you plan to have them connect to the Ubuntu site, test it before class, because sites frequently change, and you will want prepare them for any differences between the steps and what they will encounter. Give each student a blank disc. Even if the students will install Linux on a computer, have them create a LiveCD, which they can take with them to practice working with Linux.
  • Step-by-Step 8.02 Installing Linux Test the installation before class. If the students will install into a virtual machine, ensure that the VMs are created ahead of time. Refer to Chapter 3, if necessary. The installation program guides the user through the process. The screens may not be identical to those shown in the book.
  • If the students installed Ubuntu with the GNOME GUI, show them how to open a Terminal window so that they can practice the commands. This is described on Page 290.
  • shutdown –h now Shuts down immediately and turns off the computer. The process may take a few minutes shutdown –4 now Shuts down immediately and restarts the computer.
  • Be prepared to have the students do the three Try This exercises on Pages 292 and 293 and/or demonstrate these exercises.
  • This illustration is on page 293, and is the result of the What Time Is It? Try This exercise.
  • Take a moment to reinforce that everything in Linux is treated as a file. This can have some major implications with how users interact with parts of their system, such as the keyboard and monitor, which are “files.” Make clear to students that this characteristic of Linux makes mastering file management in this OS of utmost importance.
  • Demonstrate the commands discussed in this section and give the student time to do the Try This exercises on Pages 297 through 303. Point out Table 8-2 on Page 295 that lists the Linux default directories.
  • Point out Table 8-3 on Page 296, which lists shell commands for file management, and Table 8-4 also on Page 296, listing the commonly used options for the ls command.
  • Point out Table 8-3 on Page 296, which lists shell commands for file management, and Table 8-4 also on Page 296, listing the commonly used options for the ls command.
  • If time permits, give the students time to work in the GNOME GUI, and then ask them to comment on what they like about the Gnome GUI as compared to the Windows GUI. What do they dislike?
  • Ask students if they can think of why the default is not to delete a user’s home directory when deleting a user. Consider a user who leaves a job, and the need to preserve all the work-related files for the next person in that position. Then discuss how to move those files to the new user’s home directory. This is a situation faced by administrators of all types of systems, not just Linux, and the normal default is not to delete the data files associated with an account when deleting an account.
  • Step-by-Step 8.03 Working with Directories This Step-by-Step exercise has the students apply what they learned earlier in this chapter about using shell commands to manage directories and files, and apply what they learned in this section to create permissions with the chmod command.

Survey of Operating Systems Ch 08 Survey of Operating Systems Ch 08 Presentation Transcript

  • Chapter 8 Linux on the Desktop McGraw-Hill
  • 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
  • Linux Overview
    • Why Learn Linux?
      • Qualifying for a Job
      • Improving Your Skills
  • 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
  • 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
  • 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
  • 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
  • Linux Overview
    • Drawbacks of Linux
      • Lack of Centralized Support
      • Limited Software Selection
      • Limited Hardware Support
      • Complexity
  • 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)
  • Linux Overview
    • Acquiring Linux for the Desktop
      • Ubuntu
        • Download includes a LiveCD distribution
        • Complete software bundle
          • OpenOffice
          • Firefox
        • Up to 700 MB download
  • Step-by-Step 8.01 Downloading Linux and Creating a LiveCD Linux Overview
  • 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
  • Table 8-1 Ubuntu Linux Minimum Requirements versus Recommended System Configuration
  • Installing Linux
    • Performing the Installation
      • Boot into Linux installation
      • Guides you through process
      • Ubuntu GUI installation include online help
  • Step-by-Step 8.02 Installing Linux Installing Linux
  • 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
  • Figure 8-1 The Login prompt
  • Figure 8-2 The $ prompt shows user name, computer name, and current directory
  • 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
  • Linux Basics
    • Logging in to Linux
      • Log out
        • Type Exit or
        • Press Ctrl-D
  • 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
  • Linux Basics
    • The Ubuntu GNOME Terminal Window
      • Terminal window equivalent to a Windows Command Prompt window
      • Open from the GNOME Applications menu
  •  
  • Figure 8-3 A GNOME terminal window
  • Linux Basics
    • Working with Linux Commands
      • The Command Line Interface Shell
        • BASH, an acronym for Bourne Again Shell
        • Shell commands
  • 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
  • Figure 8-4 Entering this command in all caps resulted in an error message
  • Figure 8-5 Entering the previous command in lowercase resulted in running the correct command, showing the user manual entry for the ls command
  • 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
  • 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
  • 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
  • Figure 8-6 The manual command documentation
  • The date and cal commands
  • 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
            • shutdown -hnow
  • Figure 8-7 Example of a BASH error for an unrecognized command
  • Figure 8-8 An unrecognized command in a GNOME terminal window
  • 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)
  • 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
  • Figure 8-9 Linux error messages are not very helpful
  • Figure 8-10 Output from the ls and ls –l commands
  • 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
  • Table 8-2 Linux Default Directories
  • Table 8-3 Basic Shell Commands for File Management
  • 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
  • Table 8-4 Commonly Used Options for the ls Command
  • Figure 8-11 File listing of the /etc directory
  • Figure 8-12 File listing with more details
  • Figure 8-13 A listing with all entries displayed
  • Managing Files and Directories with Shell Commands
    • Working with Directories in Linux (cont.)
      • Changing the Current Directory
        • cd command
        • cd private
        • cd /usr/sbin
  • Figure 8-14 Changing directories Figure 8-15 Changing back to a home directory using the tilde (~)
  • 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
  • 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
  • Using wildcards
  • 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
  • Figure 8-16 Using mkdir to create directories and ls to show them
  • 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
  • Figure 8-17 Copying the ntp.conf file
  • 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
  • Table 8-5 Common Pico Commands
  • Figure 8-18 The Pico editor with an open document
  • 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
  • Figure 8-19 The Vim user interface with a document open
  • 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
  • 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
  • Figure 8-20 Using the rm command to delete a file
  • 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
  • Renaming a file with the mv command
  • 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
  • Figure 8-21 Using the more command
  • Securing a Linux Desktop
    • Using the Root Account
      • Create a strong password
      • Root is also called superuser in some Linux references
  • Figure 8-22 After logging on as the root the # prompt displays
  • 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 #
  • 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
  • The sudo command prompts for a password before executing a command
  • Figure 8-23 The gksudo command prompts you for the password of the current user—not the root account
  • 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
  • 8-24 Supply your password to perform an administrative task
  • 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
  • Table 8-6 Shell Commands for User Management
  • Figure 8-25 A GUI tool for user management
  • 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
  • Installing the finger daemon
  • Figure 8-26 Using the useradd command to create a user
  • 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 pass­word
          • passwd username
        • Linux will only accept complex passwords
  • Figure 8-27 Using root to change another account’s password
  • 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
  • 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
  • Figure 8-28 A sample listing showing attributes
  • 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
  • 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
  • Table 8-7 Access Mode Numbers
  • Step-by-Step 8.03 Working with Directories Securing a Linux Desktop
  • 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
  • Figure 8-29 Error screen in an application indicating trouble saving a file
  • 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
  • Figure 8-30 Results of entering a head command for a.out
  • 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
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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).
  • 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).
  • Chapter 8 Summary
    • Linux Basics (cont.)
      • Linux is case sensitive, while DOS and the Windows command prompt are case in sensitive.
      • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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).
  • 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).
  • 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.