• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content







Total Views
Views on SlideShare
Embed Views



1 Embed 1

http://www.slideshare.net 1



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.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Unix.ppt Unix.ppt Presentation Transcript

    • Operating Systems The Relationship Between Hardware & Software
    • Goals
      • Understand what an operating system is
      • Become familiar with several different operating systems
      • Learn about the important features of an operating system, including file management
      • Understand the Unix Operating System and tools associated with Unix
      • Understand Unix Permissions
    • Why Study Operating Systems?
      • Understand the relationship between hardware & software
      • Understand future Operating Systems
      • Understand powerful tools to help you in your computer use
    • What is an Operating System?
      • Software
      • Controls the relationship between all other software and hardware
      • Other Roles
    • The Two Major Types of OSs
      • Letters with symbols, such as C:>
      • Type what you want the computer to do - the COMMAND
      • Type it correctly
      • DOS  and UNIX , but they do have GUIs available
      • Pictures with descriptive words
      • Click a picture to start a program
      • Point and Click
      • Much easier to move the pointer with the mouse and CLICK on a picture, than to remember COMMANDS
      • Window 3.1 , Windows 95 , MAC O/S
      Command Line GUI
    • So, What Does an OS Do?
      • Controls the INPUT, OUTPUT, and PROCESSING activities for the computer
      • It is the BOSS of what happens in the S/W, the H/W, and between the S/W and H/W
      • High-quality O/S can make your computer more effective and efficient
      • Good OS makes the computer easier to use and more efficient
    • The Roles of an Operating System
      • A Traffic Cop
      • A Communication System
      • A Box of Tools
      • A Self-Starter
    • OS as a Traffic Cop
      • Controls the resources of the computer
      • Resources include: memory, file storage, and CPU
      • Multitasking is possible on new computers
    • OS as a Communications System
      • Helps all of the HARDWARE components communicate with each other
      • Helps the software communicate with the hardware
    • OS as Toolbox
      • Several utility programs included with an O/S
      • File Management
      • Memory Management
      • Appearance Management
      • Networking Tools
    • OS as a Self-Starter
      • Takes over just after booting
      • Checks to see all hardware is present
      • Mechanisms for Hard Boot & Soft Boot
    • Flavors of Operating Systems
      • Marketed by Microsoft in 1981
      • Command-Line
      • Inspired by UNIX
      • Used on computers with the Intel Chip
    • Flavors of Operating Systems
      • Developed by Apple in 1984
      • Successful Marketing Campaign
      • Changed the ideas about ease of use
      • Largely ignored by the PC world
      Apple Macintosh
    • The 1984 Macintosh Ad
      • Premiered during 1984 Superbowl
      • Played just once
      • Launched a new era of advertising
    • Flavors of Operating Systems
      • Developed in 1992
      • First commercially successful GUI for PCs
      • Actually not an Operating System
      • Technically a “shell” that runs on top of DOS
      Windows 3.1
    • Flavors of Operating Systems
      • Developed in 1995
      • Introduced the idea of the “desktop” for PCs
      • Independent Operating System
      • Made networking easier
      Windows 95/98/2000
    • Flavors of Operating Systems
      • Developed in 1995
      • Introduced the idea of the “desktop” for PCs
      • Independent Operating System
      • Made networking easier
      Windows 95/98/2000
    • Flavors of Operating Systems
      • Developed by Bell Labs in 1969
      • Command-Line OS
      • Offered File Sharing
      • Offered Process-Sharing
    • Introducing Unix Commands
      • Command Line OS
      • Issue commands from a command prompt: phoenix{jstudent}/:
      • Unix is case sensitive
      • Commands are typed in lowercase: cp (copy) is NOT the same as Cp or CP
    • Unix Shells
      • Unix has a number of shells which help the user interact with the Operating System Kernel (the main program that stays resident in memory and executes OS commands)
      • Shell Examples:
        • Bourne Shell
        • Korn
        • Bash
        • TCSH
        • Csh – “C-shell”  The default shell for Phoenix
    • Command Syntax
      • Case sensitive! All commands are lowercase
      • General Format: command [switches] parameter1 parameter2
      • Example: ls –l *.html
      Command Flag Argument
    • Correcting Typographical Errors
      • DEL key removes the character to the left (in some Telnet clients, BACKSPACE will also do this)
      • To erase:
        • C-w – Erases previous word
        • C-u – Erases an entire line
    • Directory Structures
      • Unix paths begin with a forward slash
      • The initial forward slash (/) represents the root directory
      • An absolute path begins at the root: /home/jstudent/public_html/
      • A relative path indicates location relative to your present working directory: ../images/
    • More on Directories
      • The command pwd will return the directory name in which you are currently working
      • The directory that represents your personal section of the server is called your home directory
      • The root directory is parent directory to all other directories (usually restricted use)
    • Directory Notation
      • / - represents a directory
      • /. – represents the current directory
      • /.. – represents the parent directory
      • /~ - represents a user’s home directory
      • Creating directories
        • No spaces in a name
        • Use _ or camel casing to name directories
        • Case sensitive (usually in lowercase, with camel casing)
    • Creating a Directory
      • Use the mkdir command: mkdir campingImages
      Command Required argument: name of the directory (uses camel casing)
    • Naming Files
      • Extensions
        • Determine the type of the file
        • Examples
          • *.txt
          • *.html
          • *.cgi
          • *.gif
          • *.jpg
      • Filenames that begin with “.” are ‘hidden’ and will not appear unless a special directory command is used.
    • File & Directory Permissions
      • ls –l command will show full details: drwxr-xr-x 2 rmolnar staff 512 Sep 18 2001 funstuff/ -rwxr-xr-x 2 rmolnar staff 312 Oct 11 2000 new.html
      Permissions Owner Group Size Date Name
    • Unix Permissions
      • Permission sequence found at the beginning of a directory listing (first 10 characters):
      • d rwx r-x r-x
      Directory? Owner’s Permissions Group’s Permissions World’s Permissions
    • Unix Permissions
      • The first character represents whether the listing is a directory. If it is a directory, a “d” will appear in the first character; otherwise, you should normally see a dash (-).
      • d rwx r-x r-x
    • Unix Permissions
      • The remaining nine characters are divided into three triplets, each representing the permissions for the owner, the owner’s group and the world.
      • - rwx r-x r-x
      Owner Group World
    • Unix Permissions
      • In each triplet, three permissions can be assigned:
        • 1 st Position: r stands for R ead; grants permission to view the contents of a file or directory (Value is ‘r’ or ‘-’)
        • 2 nd Position: w stands for W rite; grants permission to modify a file or the contents of a directory (Value is ‘w’ or ‘-’)
        • 3 rd Position: x stands for e X ecute; grants permission to run an application or open a directory (Value is ‘x’ or ‘-’)
    • Unix Permissions
      • When changing permissions, we must first decide what number will represent the permissions for a triplet
      • We can do this by determining whether or not a permission is turned on or off
        • If a permission is turned ‘on’ (represented by r, w, or x), it gets a value of 1
        • If a permission is turned ‘off’ (represented by a dash), it gets a value of 0
      • After deciding whether the three permissions in a triplet are on or off, we will have a binary number
      • We can convert the binary number to its octal equivalent
    • Unix Permissions 7 1 1 1 r w x 6 1 1 0 r w - 5 1 0 1 r – x 4 1 0 0 r - - 3 0 1 1 - w x 2 0 1 0 - w - 1 0 0 1 - - x 0 0 0 0 - - - Octal Binary Permissions
    • Unix Permissions
      • Once you’ve established the octal number representing the permission for each triplet, you can then use the change mode ( chmod ) command to give a directory or file proper permissions
      • Syntax: chmod permissionMask file/directory
      • Example: chmod 755 public_html
      • Typically, directories and executable files are given “755” permissions, while other files are given “644” permissions
    • Navigating Unix
      • To move from directory to directory, we use the cd command
      • Syntax: cd path/
      • To move from a parent to a child directory: cd child/
      • To move from a parent to a grandchild directory: cd child/grandchild
    • Navigating Unix
      • To move from a child to a parent directory: cd ..
      • To move from a grandchild to a parent directory: cd ../..
      • To move to a directory that shares the same parent: cd ../Child 2
    • The List Command
      • The list command ( ls ) shows the contents of a directory
      • We can add switches to the list command to modify what the command can do:
        • ls –l shows files in long format, including permissions (On Phoenix, you can also use the alias ll )
        • ls –a shows hidden files
        • ls –c shows file listings in a column format
        • ls –t sorts file listings by last modified date
      • To use more than one flag, concatenate them: ls -lt
    • Using Wildcards with ls
      • ls a* - Wildcard, All files starting with 'a'
      • ls *a* - All filenames with 'a' in them
      • ls *a*html - All filenames with 'a' in them and ending with html
      • ls ????? - All 5 charater filenames
      • ls [abc]* - All filenames starting with a, b, or c
      • ls [a-c]* - Same as above but done as a range
      • ls [^a-c]* - All filenames not starting with a, b, or c
    • The Unix Copy Command
      • cp can be used to make a copy of a file, leaving the original file untouched
      • Syntax: cp oldfile [path/]newfile
      • To make a copy of a file while both the original and copy are in the same directory: cp index.html home.html
    • The Unix Copy Command
      • To make a copy of a file that results in the copy retaining the original’s name , but is housed in a different directory: cp index.html ../academic/
      • To make a copy of a file that results in the copy having a new name and is housed in a different directory: cp index.html ../academic/home.html
    • The Unix Move Command
      • The mv command has two purposes:
        • To move files from one directory to another
        • To rename files
      • Syntax: mv oldfile newpath/[newfilename]
      • To move a file from one directory to another: mv index.html ../friends/
    • The Unix Move Command
      • To rename a file (stays in the same directory): mv index.html home.html
      • To move a file and rename it at the same time: mv index.html ../friends/home.html
    • Deleting Files
      • Use rm to delete files
      • Syntax: rm filename
      • To delete a single file: rm index.html (answer Y to confirm delete)
      • To delete multiple files using a wildcard: rm *.html (answer Y to confirm delete for each file)
    • Deleting Directories
      • Use rmdir to delete directories
      • Syntax: rmdir directoryname
      • To delete a directory: rmdir images/ (answer Y to confirm delete)
    • Other Useful Commands
      • passwd – Password utility that allows users to update their passwords
      • exit – End your Unix session (you can also use bye on Phoenix)
      • clear – Gives you a blank screen (you can also use cls on Phoenix)
      • who – Lists users currently logged in to the server
    • Other Useful Commands
      • finger username – Retrieves information about a user
      • cal – Displays a calendar of the current month
      • date – Displays the current system date
      • !! – (pronounced “bang bang”) repeats the last command
      • ![a..z] – Repeats the last command beginning with selected letter (a-z)
    • Other Useful Commands
      • |more – Added to commands which display lists to force page stops (Ex: ls –lt |more )
      • C-z – Temporarily stop a process
      • fg – Bring a process to the foreground after it has been stopped
      • vacation – Turn on the autoreply for e-mail
      • pine – Launch the Pine E-mail client
      • emacs – Start the Emacs editor
    • Online Manual
      • Eight Sections
        • Commands
        • System calls
        • Library functions
        • Devices and device drivers
        • File formats
        • Games
        • Miscellaneous
        • System maintenance
    • Using man
      • man command
      • To lookup help on the cp command: man cp
      • To lookup help on the ls command: man ls
      • C-c exits the manual.
    • Questions?