UNIX Introduction: The UNIX Operating System
UNIX Introduction: The UNIX Operating System
The kernel
As an illustration of the way that the shell and the kernel work
together, suppose a user types rm myfile (which has the
effect of removing the file myfile). The shell searches the
filestore for the file containing the program rm, and then
requests the kernel, through system calls, to execute the
program rm on myfile. When the process rm myfile has
finished running, the shell then returns the UNIX prompt % to
the user, indicating that it is waiting for further commands.
The shell
The shell acts as an interface between the user and the kernel.
When a user logs in, the login program checks the username
and password, and then starts another program called the shell.
The shell is a command line interpreter (CLI). It interprets the
commands the user types in and arranges for them to be carried
out. The commands are themselves programs: when they
terminate, the shell gives the user another prompt (% on our
systems).
The adept user can customise his/her own shell, and users can
use different shells on the same machine. Staff and students in
the school have the tcsh shell by default.
The tcsh shell has certain features to help the user inputting
commands.
History - The shell keeps a list of the commands you have typed
in. If you need to repeat a command, use the cursor keys to
scroll up and down the list or type history for a list of previous
commands.
Examples of files:
All the files are grouped together in the directory structure. The
file-system is arranged in a hierarchical structure, like an
inverted tree. The top of the hierarchy is traditionally called root.