Network+ Chapter 10 by mudoc123


									Chapter Ten

with UNIX
            Chapter Objectives

Describe the origins and history of UNIX operating system
Identify similarities and differences between popular
implementations of UNIX
Understand why you might choose a UNIX server for a
corporate network
Explain and execute basic UNIX commands
Use Linux to add groups and users and to change file access
Explain how UNIX can be internetworked with other network
operating systems
                         UNIX History
                                    "...the number of UNIX installations has grown to
                                               10, with more expected..."
                                     - Dennis Ritchie and Ken Thompson, June

Its history began in the late 1960’s at Bell
Laboratory in NJ
The operating system was designed with the
goal of allowing several users to access the
computer simultaneously
    originally programmed in assembly language but
     it didn't allow portability to other hardware
    in 1973, much of UNIX was rewritten in C
UNIX History
    In 1977, a Berkeley
    graduate student put
    together the first
    Berkeley Software
    Distribution (BSD)
    version of UNIX
    In 1982 , AT&T
    transferred it's UNIX
    development to
    Western Electric.
    Many different
    developers helped
    create UNIX
    UNIX is touted as
    being the backbone
    of the Internet
             Common UNIX Features
       The ability to support multiple,
       simultaneously logged in users
       The ability to start processes in the
       Hundreds of subsystems, including
       dozens of programming languages
       Program source code portability
                                        There are many “windows managers” (graphical
                                        user interfaces) that can be incorporated, the most
                                        popular of which is the X Window system

Check out:
      Current State of the Market
The most significant market segments are
   Proprietary UNIX
      An implementation of UNIX for which the source code is
       either unavailable or available only by purchase – see
            Sun’s proprietary version of UNIX is called Solaris
            IBM’s proprietary version of UNIX is called AIX
            HP’s proprietary version of UNIX is called HP-UX
   Open Source UNIX
      Software developed and packaged by a few individuals and
       made available to anyone without licensing fees
      Also called freely distributable software
      Includes UNIX-like systems such as Linux
      “Flavor” - different implementations
Choosing a Proprietary UNIX System
   It’s expensive

        Can cost millions of dollars to purchase a license
   Customer has no access to the system’s source code and thus
    cannot create a custom solution
   Accountability and support

        The vendor can be called for assistance
     Optimization of hardware and software
        They make sure it runs well on different platforms
     Predictability and compatibility
        New versions are “backwards compatible”
        New versions are released at regular intervals
Choosing an Open Source UNIX
  It’s inexpensive

       Usually available at no cost to the user
    Because of its “General Public License”, the source code has to be
     made available
       Programmers have to publish changes in source code
  No one person can claim ownership of the source code
  User’s can add functionality not provided by a “proprietary” vendor

  The download time for the O/S can be long (<650 MB)

  There is very little support

       You can purchase “flavors” from various vendors and they will provide
        a CD-ROM and support
 Selecting a Network Operating System

Is it compatible with existing infrastructure?
Will it provide the security required by the network’s resources?
Can the technical staff manage it effectively?
Will existing applications run smoothly on it?
Will existing applications run smoothly on it
Will it accommodate future growth (that is, is it scalable)?
Does it support additional services the network’s users require?
How much does it cost?
What type of sort can be expected from the vendor?
              Choosing UNIX
UNIX systems can act as file servers to Windows, NetWare, and
Macintosh clients
  Samba (

     Open source software that’s been available for ~ 10
     Allows file and print, NetBIOS browsing, FTP
     Uses Common Internet File System (CIFS) protocol
     Runs on UNIX, LINUX and VAX servers
UNIX includes a robust security model
  Some proprietary UNIX systems have received Orange Book
  Rigorous operating system security specification first
   published by U.S. Department of Defense in 1985
   Hardware for a UNIX Server

Basic system unit must
  Motherboard with

    CPU, memory, and
    I/O control
  Network interface

    card (NIC)
  Floppy disk drive

  CD-ROM drive

  One or more fixed

                         To see a larger view, click on
Decisions in Choosing Hardware

         Which applications and
         services will run on the
         How many users will this
         system serve?
         How much random access
         memory (RAM) will the server
         How much secondary storage
         (hard disk) will the server

Red Hat Linux supports most modern PC
hardware. Check the Hardware Compatibility
List at
Minimum and Recommended Hardware
Requirements:                                      For SCO Unix hardware
                                                   requirements, go to:
Minimum: Pentium-class                   
Recommended: 200 Megahertz Pentium-class           s/openserver/System_Requireme
or better                                          nts.html
Hard Disk Space*:
Minimum: 650MB
Recommended: 2.5GB
Full Installation: 4.5GB
   *Additional space will be required for file
                                                 For AIX Unix hardware requirements,
                                                 go to:
Minimum for text-mode: 32MB
Minimum for graphical: 64MB                      http://www-
Recommended for graphical: 96MB        
            A Closer Look at Linux
Linux multiprocessing
  Supports symmetric
    multiprocessing (SMP)
       Up to 16 processors
Linux memory model
  Uses both physical and
    virtual memory efficiently
  Allocate memory area for
    each application
      But actually shares memory
       area when it can
      There may be multiple
       instances of specific user
       information but the
       application itself uses only   Linux uses 32-bit addressing that enables
       one instance                 programs to access 4 GB of memory (2^32=
                                       4.29 x 10^9)
                     Linux Kernel

  As in NetWare, UNIX’s kernel is the core of the system

  Also similar to NetWare, it is possible to add or remove

   functionality by loading and unloading Linux kernel
      Analogous to NetWare NLMs
      Applications are started and stopped by typing
      Different version numbers of Linux represent different
       kernels (referred to as the kernel version)
            Don’t get confused with the “flavor” versions, though
        Linux File and Directory Structure

           UNIX really had the first Hierarchical file system
              Organization of files and directories on a disk partition in
               which directories may contain files and directories

/bin holds                                                      Think of
the                                                             finding a file in
                                                                the same
  The /boot                                                     manner as
  directory                                                     DOS…/var/log/
  the kernel
               Linux File Services
Linux includes support for multiple types of file systems
  Local file systems

  Remote file systems (analogous to Windows’ shares)

Its native file system, called ext2 (second extended file system) and
now, ext3.
Why Linux became popular? Because it plays well with others!
    You can access partitions formatted with DOS FAT
    You can access partitions formatted with Windows NTFS
    You can access partitions formatted with OS/2 HPFS
You can map shared drives from Windows and Netware servers and
share local partitions with other users.
Linux Internet Services and Linux Processes

   Open source software application that is the leading Internet

     Web server
   Until very recently, only ran on UNIX systems

   UNIX was the development model for the original Internet

     technologies such as FTP, Telnet, HTTP and POP
 Linux Processes
   Another UNIX innovation is the notion of separate,

     numbered processes
   Prevents one process from disrupting the operation of the

     entire system (it is very difficult to crash a Linux system).
       Linux Command Sampler

Command interpreter
   that’s the kernel, for the most part
   Also known as a shell
      The interpreter that translates your typed commands into machine
       instructions that the operating system can understand
   Is the program that runs other programs
   Keeps track of the command history
   The primary interpreter is the /bin/sh (think of cmd.exe in
     Linux Command Sampler
Manual pages
  Linux system documentation for all commands are arranged
   in 9 sections:
      Section 1 covers commands typically entered while
       typing in a command window
      Sections 2 through 5 document the programmer’s
       interface to the UNIX system
      Section 6 documents some of the games
      Section 7 describes the device drivers
      Section 8 covers the commands used by administrators
       to manage the system
      Section 9 documents the UNIX kernel functions
       programmers use to write device drivers
      Linux Command Sampler

You can access manual pages by entering the man command in
a Linux command window
For example, to read the manual page entry for the telnet
command, enter man telnet in a command window
   Makes it possible to find possible manual page entries for
    the command you want to use
       For example: type apropos list to search for a command
        that lists files
       Apropos command would then display all commands
        and programming functions that include the keyword list
        in their manual page entries
       Is pretty much like a search engine
        Linux Command Sampler

Most commands are lowercase alphabetic characters
The actions would want to take are usually an abbreviated form
of a verb
   Ls – list
   Mkdir – make a directory
   Rm – remove
The things you want “acted upon” are usually nouns
   A file name
   A user name
   A directory name
Options to commands are usually adjectives or adverbs
   -a = all
           Linux Command Sampler
The Linux directory separator is “/” (forward slash)
  The telnet command in Linux is /usr/bin/telnet
Windows NT separator is character is “\” (backslash)
  In a Windows NT command window, telnet is typed as
Pipe (entered as a vertical bar “|”)
  Serves as the connection between two commands
  In DOS, think of typing >:dir | more
  Two or more commands separated by a pipe
  The above example shows two commands
          Show the directory
       Stops the directory listing from scrolling so you can see a page at a
      Linux Command Sampler

Linux systems keep quite a bit of information about each file,
  Filename

  File size (in bytes)

  Date and time a file’s i-node (file information node) was
  Date and time that the file was last accessed

  Date and time that the file contents were last Number of
    “aliases” or links to the file
  Numeric identifier of the user who owns the file

  Numeric identifier of the group to which the file belongs

  Access rights for the owner, the group and all others
        Linux Command Sampler
The system stores the file information in an i-node
Beginning of each file disk partition contains space reserved for the i-
i-nodes contain the pointers to the actual file contents on the disk
To learn about the i-node information, use the ls command

                                                        Example of
                                                        output from
          Linux Command Sampler
The string of r,w,x’s represent the access permissions for the files
First character represents the file type
     d = directory
     - = regular file such as word processing or spreadsheet
     l = symbolic link file
     Pre-installation Questions

What is the new server’s name?
What is the server’s IP address?
What kind of video card is installed in the server?
What kind of monitor is attached to the new server?
What is the administrative user’s password?
How can I remember all this information?
  Pre-installation Requirements

A clean PC that satisfies the Linux hardware requirements
The distribution media for Red Hat version 7.2 (CD-ROM and
floppy disk)
One or two hours of uninterrupted time
Read more about multiboot systems at the Linux installation
HOWTO site:
Configuring Linux for Network Administration

 Adding groups and users
   Groupadd

       Command to add a new group ID to a Linux system
   Useradd

       Command to add a new user ID to a Linux system
Configuring Linux for Network Administration

 To add group IDs to a Linux system
   Log in to system as user root

   Type groupadd instructors, then press Enter at the

    command prompt to add group “instructors”
   Type groupadd students, then press Enter to add the

    group “students”
   Type groupadd administrators, then press Enter to add

    the group “administrators”
Configuring Linux for Network Administration

 To add a new user and assign the user a password:
   Type useradd –g users –G instructors thomas, then

    press Enter to add new user account thomas
   Type passwd thomas, then press Enter

   Type the password and press Enter

       You may use any of the characters on the
        keyboard in your password.
     Changing File Access Permissions

To create a directory and assign it to a group
  To log off Linux, type exit, then press Enter

  To log back on to as thomas, enter thomas at the login

  Enter password for thomas

  To create new directory, type the command mkdir

   PROGRAMS, then press Enter
  List the file with ls –l

  Enter the command chgrp instructors PROGRAMS to

   assign PROGRAMS to the group instructors
    Changing File Access Permissions

To change the access permissions for the PROGRAMS
  Type chmod g+w PROGRAMS to add write access for the

    instructors group to PROGRAMS, then press Enter
  Type chmod o-rw PROGRAMS to remove read and write

    access by others to PROGRAMS, the press Enter
  Type ls –l to view the access permission assigned to

Internetworking with Other Network Operating Systems

   Dozens and dozens of command-line utilities that enable access
   to contents of files generated on other systems

To top