What is Terminal, Command Prompt, CLI, Shell, Bash, ZSH ?

What is Terminal, Command Prompt, CLI, Shell, Bash, ZSH ?

Today I messed up my Terminal so badly that even ls command was not found. And I was like it's a basic standard command which does not depend upon anything to run then why is this happening? This goes without saying StackOverflow saved the day but this led me to think that as a developer Terminal is our gateway and playground to everything and I know absolutely nothing about it. I just know my way by rote. So I decided to learn more about our friendly neighbourhood terminal.

There are multiple names that we might use interchangeably: Terminal, Command Prompt, CLI, etc.

Let’s see exactly what they mean:

  1. Command Line Interface: is simply a program used to interact with the OS using Textual Commands only.

  2. Terminal: is a program that gives the user a CLI to input commands and display the output. In Ubuntu and Mac, it is called Terminal.

  3. Command Prompt: is a Windows program that gives the user a CLI to input commands and display the output.

Now let’s go back to my problem when even as basic command as ls was not working for me, I went on StackOverflow and found out that this happens because I messed up with my Bash or ZSH config file. Now what in the world is Bash and ZSH !?

I have heard about ohmyzsh but that was for something related to GitHub repos and it shows uncommitted changes and repo name, etc etc..

I just solved my issue first and then went on to see what exactly is Bash & ZSH and I found out that they are something known as SHELL

Shell: interprets the command, checks the syntax, if everything is correct then converts the command Into a kernel-understandable form and passes it to the kernel.

By default all the Terminals and CMDs come with a shell.

Mac uses ZSH by default (after Mac OS 10.15, before it was BASH)

Linux uses BASH by default

Windows uses Command Shell and PowerShell

Bash stand for Bourne-Again shell, is the most popularly used shell with all the basic features.

Z shell is built on top of the bash shell and has many new features such as plug-in support, better customisation, theme support, spelling correction, etc.

Now your homework is to go and learn more about Bash, ZSH and PowerShell, these are programming languages where you can use variables, write if else conditions, automate stuff, do bulk file changes and what not.

If you learnt something new today through this or the homework, do let me know in comments or DM me on Twitter / LinkedIn.