Connect with us


Explain What is Kernel and Shell in UNIX



what is shell and kernel in unix

In UNIX and Linux Kernel and shell is the most important thing to interact with users. In this article, I explain what is kernel and shell in UNIX and the kernel and shell relationship, diagram.

Structure of UNIX Operation System

Foremost among the division of labor between two agencies, one interacting with the user and the other with the machine hardware. Two abstract constituents – the Kernel and the Shell.

Read Also: Different Type of Computer Memory

What is the kernel?

The Kennel the heart of the Unix System – a collection of programs mostly written in C Langauge, which communicate with the hardware directly. There is only one kernel for any system. It is that part of the Unix System that is loaded into memory when the system is booted. It manages the system resources, allocates time between users and processes, decides process priorities, and performs all the other tasks, which you would not like to bother about.

Because the kernel isolates itself from the user programs and these programs are dependent on the hardware they use, it is easy to move them across different systems. Programs therefore must not have knowledge of the devices they use. The Unix Kernel consists of about 10,000 lines of C code and another 1000 lines of assembly code. The kernel represents only a small portion of the operating system (5 to 10 percent of the code).

Diagram of Kernel and Shell

what is shell and kernel in unix

Read Also: History of Unix OS

What is Shell

The Shell, on other hand, is the “sleeping beauty”. It is the interpreter of user requests. Com-puters cannot translate commands into action, an interpreter is required and the shell handles that job in the UNIX system and It takes a command from the User, deciphers it, and by exchanging information communicates with the Kernel so that the command is executed.

It is actually the interface between the user and kernel, which effectively insulates the user from the knowledge of Kernel functions. The shell Sprencieheans takes care of the features of redirection and it also has a programming capability of its own. The shell not permanently resident in the main memory like the Kernel-it can be swapped as needed. A shell pro-grams starts as you log in and terminates as you log out.

A unique feature of the UNIX operating systems that all UNIX commands exist as utility programs. These programs are located in individual files in one of the system directories such as/bin, /usr/bin,/sbin, /etc/user/bin, etc. The shell enables a user to access all other utilities and resources that are available on the computer.


If you like the article please comment below to improve our articles 🙂