Unix Basic Tutorial

What is Unix?Unix Architecture

Unix is made up of 3 main parts: the kernel, the shell, and user commands and applications.

Image Description

Unix architecture, from general user applications you'd find on any desktop computer down through the command line and to the central hardware

The kernel and shell are the heart and soul of the operating system.

The kernel ingests user input via the shell and accesses the hardware to perform things like memory allocation and file storage.

The shell is an interface that interprets the command line input and calls the necessary programs to do the work. The commands that you enter are programs themselves, so once the work is done, the command line will return to a prompt and await further input.

There are several different shells, and syntax and shortcuts vary between them. For example, the "csh" shell listed in the image above is called "C shell" and has syntax similar to the C programming language. All shells support similar basic functions.

One example of how the shell and kernel work together is copying a file. If you want to copy a file named "file1" and name the copy "file2", you would enter "cp file1 file2" at the command line. The shell will search for the program "cp" and then tell the kernel to run that program on "file 1" and name the output "file 2". When the copying is finished, the shell returns you to the prompt and awaits more commands.