The Wayback Machine - https://web.archive.org/web/20240619113226/https://www.geeksforgeeks.org/what-is-terminal-console-shell-and-kernel/
Open In App

What is Terminal, Console, Shell and Kernel?

Last Updated : 14 Oct, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

As a fresher, while learning Linux we get confused with the actual meaning of the terms like-Terminal, Console, Shell, and Kernel. Sometimes we mix up their usage which is technically incorrect so having a clear grasp of what every word actually means and how and where they should be used is very important.

1. Terminal:

For those having Linux OS, when we click to open the icon having the name “Terminal”, a window is opened, so in simple terms that rectangular frame or window is called terminal. With the invention of modern computers, we have this application named “Terminal”, which we can simply open with a click but during the 80s, it used to be known as “Terminal Emulators” which was not a software program but hardware, a normal Input-Output Device consisting of a keyboard and a monitor. Now the confusion arises well this is what a computer is!! But No, the purpose of a terminal is not to process information (like a typical computer) but to send commands to another system. The terminal is a program that provides the user with a simple command-line interface and performs the following 2 tasks:

  • Takes input from the user in the form of commands
  • Displays output on the screen

 We can say the terminal is a dumb thing so it does not know what to do with the input, so it needs another program to process it, and in most cases, it’s the Shell.

Terminal_linuxterminal_linux

2. Console:

In the case of Windows OS, the “Console” performs the same operations performed by the terminal, so we can say for Windows OS, the Console is the alias name for the Terminal. But Console is not opened directly rather we need to open through the Command Prompt which then opens the console or the rectangular frame on the screen.

Console

3. Shell

After writing our commands on the terminal, when we press the Enter key, the terminal passes those commands to another program to figure out what the user wants to do, and in most cases, that program is the Shell, which forms the outer layer of Linux OS, which performs the following functions:

1. 

Interprets the command given by the end-user

2. 

Checks the syntax of the command and then Checks whether the command is correctly used or not.

3. 

If everything is correct, the shell converts the command Into a kernel-understandable form and passes it to the kernel.

Else, It returns an error message                                                            

4. 

The $ prompt appears on the terminal waiting for the next command, Irrespective of whether the previous commands were correct or not.

The shell is the mediator or the interface between the end-user and the kernel. There are various shell programs we can choose from namely TCSH, KSH, Seashell, Bash, and many more, but the default one on most Linux systems and on the Mac is the GNU Bash.

shellshell

4. Kernel

It’s a computer program that forms the innermost component of an OS after the Shell.  As soon as the shell converts the user’s command into kernel-understandable form, the kernel is responsible to execute the commands with the help of its 2 components which are OS libraries and Device Drivers interacting with Application software and device hardware respectively. Following is an example of a C-program execution flow through the OS till the hardware:

Application Software: A C-program is written that takes input from the keyboard   
Operating System: Shell: Command to execute the program is given by the end-user
Kernel: takes the interpreted command from the shell OS Libraries: read() function which is invoked due to scanf() call.      
Keyboard Device driver: is invoked
Hardware: User types the input on the keyboard

By the table above, it is clear that the Kernel acts as the interface between the Application Software and the Hardware. Memory Allocation and the Processor Allocation will also be taken care of by the Kernel.


Previous Article
Next Article

Similar Reads

Difference between Terminal, Console, Shell, and Command Line
Terminal :A terminal is a text input and output environment. A terminal window, also known as a terminal emulator, is a text-only window that emulates a console in a graphical user interface (GUI). In other words, a graphical user interface application from which we can access a user's console. A terminal is a program that allows you to run a shell
4 min read
Shell Script to Show the Difference Between echo “$SHELL” and echo ‘$SHELL’
In shell scripting and Linux, the echo command is used to display text on the terminal or console. When used with the $SHELL variable, which contains the path of the current user's shell program, the output of the echo command can be different depending on whether the variable is enclosed in single or double quotes. echo "$SHELL" will expand the $S
4 min read
Shell Scripting - Difference between Korn Shell and Bash shell
Korn Shell: Korn Shell or KSH was developed by a person named David Korn, which attempts to integrate the features of other shells like C shell, Bourne Shell, etc. Korn Shell allows developers to generate and create new shell commands whenever it is required. Korn shell was developed a long year back as it is older than the BASH shell and it has fe
3 min read
Difference between Micro Kernel and Modular Kernel
Prerequisite - Kernel in Operating System 1. MicroKernel:Micro Kernel, as the name suggests, is basically a software or code that usually contains a minimum number of functions that are required, data, and features simply to implement OS. It is a very small kernel and represents well studied OS structuring idea. In simple words, micro kernels are r
3 min read
Difference between Shell and Kernel
Introduction : In a computer operating system, the shell and the kernel are two important components that work together to enable the user to interact with the system. The shell is a command-line interface that allows the user to enter commands to interact with the operating system. It acts as an intermediary between the user and the kernel, interp
3 min read
How to zoom in and zoom out terminal console in linux
Linux is a Debian-based Operating system used by many professionals and other people for various purposes. Mainly Linux is used for Penetration testing and Vulnerability assessment. Windows systems often interact with GUI (graphical user interface) but in Linux, we use a terminal console more to interact with the system and to do things normally. I
7 min read
Kali Linux - Terminal and Shell
Generally, operating systems have 2 interfaces GUI(Graphical User Interface) and CLI(Command Line Interface) and the same is the case with Linux Based Operating Systems. Linux Operating Systems are generally packed with terminal emulator packages for CLI based functioning and Desktop environment packages for GUI based functioning. Some common ones
3 min read
How to Use ‘Tmux Terminal’ to Access Multiple Terminals Inside a Single Console
tmux, or Terminal Multiplexer is a command-line tool for managing multiple terminal sessions in one window. It's beneficial for developers and system administrators, offering features like splitting the terminal into panes, creating sessions with windows and panes, customization, scripting, and remote access. Users can organize tasks efficiently, c
4 min read
Shell Scripting - Interactive and Non-Interactive Shell
A shell gives us an interface to the Unix system. While using an operating system, we indirectly interact with the shell. On Linux distribution systems, each time we use a terminal, we interact with the shell. The job of the shell is to interpret or analyze the Unix commands given by users. A shell accepts commands from the user and transforms them
3 min read
Introduction to Linux Shell and Shell Scripting
If we are using any major operating system, we are indirectly interacting with the shell. While running Ubuntu, Linux Mint, or any other Linux distribution, we are interacting with the shell by using the terminal. In this article we will discuss Linux shells and shell scripting so before understanding shell scripting we have to get familiar with th
7 min read