What is UNIX?
UNIX is an operating system which has been under constant development. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops. UNIX is widely used in computer network systems that have personal computers, workstations, etc.
UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available.
Types of UNIX
The most distinctive characteristic of UNIX is that, unlike other operating systems, detailed contents of the operating system written in C language have been released to the public. For that reason, a great number of computer manufacturers can easily port it to the hardware of their own products. As a result, users are able to operate UNIX in all computer manufacturer products. There are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.
The UNIX operating system
UNIX is an operating system which can perform distributed processing in computer network environments. Its characteristics are mentioned below:
- Distributed processing is presupposed
- It was developed assuming that it would be used in workstations
- It provides the multi-user function, which enables simultaneous use by multiple users. In operating systems that provide the multi-user function, a procedure called log-in, to receive the service, and a procedure called log-out, to report completion, are required
- Through multi-programming, it can simultaneously process multiple jobs. In UNIX, this is called the multiprocessing function
- As a technology to connect computers of different manufacturers, the communication protocol called TCP/IP has been established
- It has instruction rights called commands that enable the user to use UNIX in an interactive mode. This function is called human interface, and has been implemented by X-Window
- The program development tools are abundant
UNIX is an operating system which can be simultaneously used by multiple users, and in which each user can simultaneously perform multiple job processing. The UNIX operating system is made up of three parts; the kernel, the shell and the programs.
The kernel
UNIX has a control program called Kernel, which has the following functions:
- It is the central part of the operating system, and controls the system resources
- It performs the process management. (Since UNIX is distributed-processing oriented, jobs are called processes)
The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls.
The shell
The shell acts as an interface between the user and the kernel. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out. A shell has the following functions:
- It interprets the commands input by the users and calls the kernel function
- It executes a program called a shell script, which combines commands
Likewise, the command uses the devices connected to the system, and call the kernel function to use the command sets.
The commands are themselves programs: when they terminate, the shell gives the user another prompt.
A user logs in -> the login program checks the username and password -> the login program starts the shell
A user types a command -> the shell searches the filestore for the file containing the program (command) -> the shell requests the kernel through system calls to execute the program
The process (command) has finished running -> the shell returns the UNIX prompt
Filename Completion - By typing part of the name of a command, filename or directory and pressing the [Tab] key, the tcsh shell will complete the rest of the name automatically. If the shell finds more than one name beginning with those letters you have typed, it will beep, prompting you to type a few more letters before pressing the tab key again.
History - The shell keeps a list of the commands you have typed in. Use the cursor keys to scroll up and down to repeat a command or type history for a list of previous commands
Files and processes
Everything in UNIX is either a file or a process.
A process is an executing program identified by a unique PID (process identifier).
A file is a collection of data. They are created by users using text editors, running compilers etc.
Examples of files:
- a document
- the text of a program written in some high-level programming language
- instructions comprehensible directly to the machine and incomprehensible to a casual user, for example, a collection of binary digits (an executable or binary file);
- a directory, which may be a subdirectory and ordinary files.
The Directory Structure
All the files are grouped together in the directory structure.