Terminal, Shell, Bash, Command Line and everything in between
As a Junior software developer, I can tell that all the above are really confusing in their meanings for beginners. In this article, I want to give you a brief explanation about them and especially on the differences. So, let's get started!
Terminal
"Terminal" is a shortcut for "terminal emulator". In the early days of the Computer Industry, computers were really huge, so the machine itself was located in a secure room that ordinary users were interacted with using a terminal.
The terminal was a teleprinter (TTY) without a screen in the beginning and later on, a screen was added too.
"A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system." (Wikipedia)
Nowadays, the terminal (terminal emulator) is a GUI to interact with the Shell. The terminal can't do anything on its own apart from giving input to the shell and displaying output from shell.
Ubuntu Terminal:
Shell
Like a shell of a walnut, the computer shell has inside a kernel.
The computer kernel has complete control over everything in the system, and the shell is the primary interface for the kernel.
Conclusion: Shell is a program that processes commands and returns an output. The terminal runs a shell.
To interact with the shell we can use different shell scripting languages such as Bash, Zsh, and Fish.
Bash
Bash stands for Bourne again shell (since it evolved from Bourne shell scripting language)
Bash is a UNIX shell scripting language that runs in most terminal emulators.
To see which language you are running, use:
echo $0
It is crucial to understand that the terminal emulator window that gets opened isn't Bash! Therefore, questions like: "how to copy and paste in Bash?" or "how do I scroll up in Bash?" are not correct since they are actions related to your terminal emulator and not to Bash.
A few words on Zsh
Zsh or Z shell is a Unix scripting language that is based on bash and includes a large number of improvements. Zsh was created a year after Bash was created.
Command Line
A command line is a user interface (often called CLI = Command Line Interface) where the user types a command and presses the enter key to execute the command. In response, the command line interpreter (Shell in a Linux system) will interpret the commands into calls to the kernel API.
Inside a terminal emulator, a command line is a specific row you are at when prompted to enter a command for execution.
I know That all this terminology may be confusing, so here is a small info graph I have made that summarizes the above.
And if to try and summarize it in one sentence:
Through the terminal emulator, we get access to the command line, and we can run Shell, which give us access to the kernel API
I hope you enjoyed reading my article and learned a few new things! I tried to keep it short simple so you will get a clear understanding of these terms.
If you have any questions feel free to ask :)
תודה רבה לך על השיתוף🙂 אני מזמינה אותך לקבוצה שלי: הקבוצה מחברת בין עסקים ויזמים במגוון תחומים. הקבוצה מייצרת שיתופי פעולה,אירועים משותפים ולקוחות: https://chat.whatsapp.com/BubG8iFDe2bHHWkNYiboeU
Great article! Sums it up nicely, had a real fun reading it. Even though i'm using the terminal a lot, I learned some new things. Keep up the good work 🙌
Thanks for sharing! I used in the past in terminator for CLI daily jobs in last few months i start work on my Linux machine with temux emulator for my CLI daily jobs. Great thing🙂
Thanks for posting gal!!
Nice article 👍