<<<<< BORDER DRAWING SUBROUTINE FOR EXAMPLES >>>>>>>>

NEXT

 $V1$
 $V1$
 ************* BACK AND FORTH PAGING SUBROUTINE ************

PAGEFLOP

If they want to quit, do so
 If They want to quit subsession, Do SO!
  Decrement LOCAL and GLOBAL Page Counters

FORWARD

  Increment LOCAL and GLOBAL Page Counters
   *************** END PAGEFLOP *********************
  ****** CHAPTER INTERNAL SELECTOR ALGORITHM ******

SELECTOR

   Reset Local Page Counter

SELAGAIN

 CHECK IF ONLY A <CR>

WRONGSEL

YOUR SELECTION IS NOT IN THE 0 - #SELIMIT  RANGE  Please try again

AANVANG

Copyright CourseWare Technologies Inc., 1985-88


 Lesson - 1


 ADMINISTERING A UNIX SYSTEM 

MENU

Administering a System|Topics to Learn|1-0|13,52
      #                   Topic
     ---                 -------
      1   -   Introduction to System Administration
      2   -   Operating System Resources
      3   -   The Superuser
      4   -   The File System
      5   -   Physical and Logical Storage
      6   -   The Command Interpreter - The Shell
      7   -   Commands and Command Syntax
      8   -   UNIX Processes
      9   -   Conclusion
     10   -   Lesson Review
      0   -   Return to the Main Menu

P1

Administering a System|Introduction|1-1.1|12,54
A system administrator does more than just mount tapes
on the tape drive or answer the phone in the computer 
room.  A system administrator:

     *  performs system configuration, 
     *  adds and removes users, 
     *  adds and removes hardware devices, 
     *  makes and maintains file systems, 
     *  sets up and controls system security, 
     *  schedules various system processes, 
     *  checks and repairs the file system, and
     *  sets up and manages the communication system.

P2

Administering a System|Introduction|1-1.2|3,54
If you are a system administrator, you have 
one of the most interesting and important jobs 
in your computer center, or in your home.

P3

Administering a System|Operating System Resources|1-2.1|10,54
     An operating system such as UNIX is a program 
that manages the resources of a computer, both 
hardware and software.


     The hardware resources of a computer are the 
Central Processing Unit (CPU), the primary memory, 
the terminals, the disk drive(s), the printer, the 
modems, and, perhaps, the magnetic tape or data 
cartridge drives.

P4

Administering a System|Operating System Resources|1-2.2|14,54
     The software resources, a great many of which are 
part of the UNIX Operating System, are the programs on
the computer that perform:

              * command interpretation,
              * data management,
              * program development,
              * text formatting,
              * input/output management,
              * file security assurance,
              * communication,
              * various applications.
              * various applications.,
              * network file system management,
              * windowing, or
              * graphics management.

P5

Administering a System|The Superuser|1-3.1|12,55
     Almost all system administration functions must 
be performed by a superuser.  A superuser usually
has the login name of root.
has the login name of root or admin.



     As a superuser, one has the right to read, write 
or execute all files.  Furthermore, a superuser has 
the exclusive privilege to change any user's password, 
change the ownership or protection on any file, enter 
or remove a user from the system and create the entire 
file system on a disk.

P6

Administering a System|The Superuser|1-3.2|12,55
     One can become a superuser either by logging in 
as root, or by executing the su or su root command and 
answering a password:  prompt!  (If you are already 
root, you will not be prompted for a password.)


     When you are logged in as a superuser, your prompt 
will be  # .


     Note that there is no password for root until 
a system administrator sets one up.

P7

Administering a System|The File System|1-4.1|11,57
     A UNIX file system is a uniform set of directories 
and files arranged in a tree-like, hierarchical structure.


     The top of the file system hierarchy is a special
directory called root with a pathname of /. 


     The pathname is the complete name of a directory 
or a file, and it traces the path through the file system 
to the desired file.

P8

Administering a System|Physical and Logical Storage|1-5.1|8,54
     In a UNIX Operating System, all devices (like 
tape drives, terminals, printers, etc.) are treated 
as files.  Even the memory is a file.


     Files must be stored somewhere, usually on some 
form of magnetic medium like a floppy disk, magnetic 
tape, data cartridge or hard disk.

P9

Administering a System|Physical and Logical Storage|1-5.2|9,55
     Because some disks are large enough to hold 
several file systems, a physical disk may be divided 
into several logical disks.


     Each logical disk is called by the name of the 
file system associated with that area on the disk.   
The name is actually a special file in the /dev 
directory.

P10

Administering a System|The Shell|1-6.1|6,52
     The Shell is a command language/program that 
most users use after logging onto a system.


     The Shell is a command interpreter which reads 
commands from either the terminal or a file.

P11

Administering a System|The Shell|1-6.2|10,54
     The Shell facilities permit you to build your 
own commands, redirect input and output, and connect 
the output of one command directly to the input of 
another.


     Most UNIX systems have at least two shells:
the UNIX Shell, sh, and the C-Shell, csh.
the Bourne Shell, sh, and the C-Shell, csh.


     Some machines also have a visual shell.

P12

Administering a System|Commands and Command Syntax|1-7.1|4,52
     A complete UNIX Operating System will have 
over 300 public commands and utilities.  As a system 
administrator one needs to know a great number of 
these commands.

P13

Administering a System|Commands and Command Syntax|1-7.2|13,52
     The syntax for most UNIX command lines is:

command  [option(s)]  argument(s)

      *  The command is what you are asking UNIX to do.

      *  The option(s) modify the actions of a command.

      *  The argument(s) are filenames or other pertinent 
         text data.


     Some commands do not require options or arguments.

P14

Administering a System|UNIX Processes|1-8.1|13,54
     All programs running under UNIX are referred to 
as processes.


     Because UNIX is a multi-processing system, several
processes are usually running simultaneously in a time-
sharing environment.  Almost invariably, the following 
processes are constantly running on a UNIX system:

       swapper  -   process swapper
     /etc/init  -   single-user/multi-user state control
     /etc/cron  -   regular process scheduler
     sh or csh  -   the login shell(s)
Administering a System|UNIX Processes|1-8.1|15,54
     All programs running under UNIX are referred to 
as processes.

     Because UNIX is a multi-processing system,
several processes are usually running simultaneously in a
timesharing environment.  Almost invariably, the following 
processes are constantly running on a UNIX system:
       swapper  -   the process swapper
     /etc/init  -   single-user/multi-user state control
     /etc/cron  -   the regular process scheduler
     sh or csh  -   the login shell(s)
   /etc/update  -   runs sync every 30 seconds in case of crash
   /etc/ypserv  -   yellow pages network lookup service
  /usr/lib/lpd  -   line printer scheduling program

P15

Administering a System|UNIX Processes|1-8.2|11,54
     When a process is waiting, it uses computer time,
but it remains inactive, waiting for an certain event 
to occur.  Your shell process, for example, waits for 
any command you issue to finish before it "wakes up" 
and gives you your shell prompt.


     When a process is sleeping, it is inactive for
a specified amount of time, not using any computer
resources.  When the specified time has passed, it 
will become active again.

P16

Administering a System|UNIX Processes|1-8.3|14,54
     As a UNIX user and in particular as the system 
administrator, you will want to know what is happening
on the UNIX System.

ps      allows you to determine the process status
          of your current processes

ps -e   allows you to determine the process status
          of all of the processes on the machine.
ps -aux allows you to determine the process status
          of all of the all processes on the machine with a
          user friendly output format.


kill    is used to terminate unwanted processes.

P17

Administering a System|UNIX Processes|1-8.4|13,56
     When a program runs from your terminal "while you
wait," and doesn't allow you to use your terminal again 
until it is finished and gives you your prompt back, 
the program is said to run in the foreground and is 
called a foreground process.


     You can also run a program in the background by
appending an ampersand,  & , to the command line.  You 
don't have to wait for a background process to finish 
before giving the Shell additional commands.  You get 
your prompt back as soon as you press <CR> and the 
command runs without your attention.

P18

Administering a System|UNIX Processes|1-8.5|14,60
     Since text formatting with programs like nroff 
is very time-consuming, they are good tasks to run in 
the background.  For example,

tbl  report  |  nroff  -mm  -o15-  >  report_nroffed  &

will run 2 processes, tbl and nroff in the background.
The process id numbers will be printed on your screen 
before you get your prompt back, i.e.,

$ tbl  report  |  nroff  -mm  -o15-  >  report_nroffed  &
1843
1844
$

P19

Administering a System|UNIX Processes|1-8.6|11,54
     Some systems will allow you to temporarily stop
a process, so you can do something else.  The process 
is placed in a state of suspended animation and you 
are returned your shell prompt.  The process is in 
the background, but is not being executed, it is just 
waiting to be returned to the foreground again.  To
stop a foreground process, you type 

<CONTROL-z>

You will see the word Stopped and your Shell prompt.

P20

Administering a System|UNIX Processes|1-8.7|10,54
     To return a stopped process or any backgrounded 
process to the foreground again, type:

fg


     To see a list of all of your backgrounded and 
stopped processes, you can use either the ps command 
or a command called jobs.  The jobs command 
is quicker but less thorough than ps.

P21

Administering a System|Conclusion|1-9.1|10,55
     Now that you are equipped with the UNIX system 
basics, you are ready to forge ahead with various system 
administration tasks, to be discussed in the following 
lessons.


     If you find that the concepts and the terminology 
sound foreign to you, we suggest that you first review 
The UNIX User and The Advanced UNIX User tutorials 
available from CTI.