paint-brush
The Shell and the Terminal: What's the Difference?by@manik
1,250 reads
1,250 reads

The Shell and the Terminal: What's the Difference?

by ManikNovember 19th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The shell and the terminal are different from each other but are often used interchangeably. The shell is a program that takes commands from the keyboard and gives them to the kernel to perform. It acts as an interface between the user and the kernel. When using a Graphical User Interface, you need software that can interact with the shell and pass commands that the kernel can execute. This program is called an emulator because it emulates the shell environment for you on your desktop interface.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - The Shell and the Terminal: What's the Difference?
Manik HackerNoon profile picture

Whenever we give commands to a computer to perform a specific task using text, we refer to it as using the command line interface. When using a command line interface, we use text commands to make our programs work instead of a Graphical User Interface. Using the command line is a different way of interacting with the computer. In the Linux world, when we refer to the command line interface, we refer to a shell and, in most cases, to a bash shell. But often, we use a program to interact with the shell, called a terminal emulator. The shell and the terminal are different from each other but are often used interchangeably.

Understanding The Shell

In one of our previous articles in this series, we discussed what an operating system is and why Linux Operating Systems Are Called Distributions. We know that the kernel is the most crucial component of the operating system. The kernel recognizes all the physical hardware on a computer and enables each component to speak to one another. At the root, the kernel grabs the instructions passed to it and gets them processed by the hardware.

The shell interacts directly with the kernel

The user does not interface with the kernel directly. There is a program called the shell between the user and the kernel, which is responsible for taking the inputs from the user and passing them on to the kernel. Simply put, the shell is a program that takes commands from the keyboard and gives them to the kernel to perform. It acts as an interface between the user and the kernel.

The Bash Shell

Most of the Linux distributions come with a shell called the bash shell. Bash is originally the GNU Project shell and was inspired by and built to mimic the original Unix shell program, ‘sh’, written by Steve Bourne. Since it was highly inspired by the ‘sh’, which was written by Steve Bourne, the folks at the GNU project decided to name the new shell bash, which is an acronym for Bourne Again Shell.

Many alternatives to the bash shell can be used with the Linux kernel, such as ZSH (ZShell), Fish, KSH (Korn Shell), etc. Different shell programs offer different features, but the basic commands and how to interact with the shell remain the same.

The Terminal (Emulator)

Different distributions of Linux come with a Desktop Envornioment installed with it, such as Ubuntu. Ubuntu's Desktop Environment is a modified version of GNOME which stands for GNU Network Object Model Environment. GNOME is a graphical user interface (GUI) and set of computer desktop applications for users of the Linux operating system. When using a Graphical User Interface (GUI) such as GNOME, you need software that can interact with the shell and pass commands that the kernel can execute. This program is called an emulator because it emulates the shell environment for you on your desktop interface.

the terminal emulator in Ubuntu Desktop Environment

Terminal software is a perfect example of an emulator. Terminal ships by default with the Ubuntu Desktop environment and can be used to access the shell. Many emulators are available, and the terminal is just one of them. What is essential to understand is that the emulator is not the shell. It's just a piece of software that enables you to emulate and communicate with the shell in your desktop environment.

What Can You Do Next 🙏😊

If you liked the article, consider subscribing to Cloudaffle, my YouTube Channel, where I keep posting in-depth tutorials and all edutainment stuff for software developers. You can also follow me on Hashnode; my profile handle - @Cloudaffle. Leave a like if you liked the article; it keeps my motivation high 👍.


Originally published here.