April 20, 2026 | Categories:
Artificial Intelligence
In my previous post I looked at the history of the Terminal. Today let's dive into the world of terminals and shells, without getting too technical.
Imagine you're sitting in front of an old-fashioned typewriter machine. You type out some text on the keyboard, and the words appear on a paper roll as you go. That's basically what a terminal does, but instead of typing on a piece of paper, it interacts with your computer.
A terminal is a program that allows you to input commands (like you would type) and see the output (like the text on the paper roll). When you open a terminal, you're essentially opening a window into your computer's brain, where you can tell it what to do and get results back.
Now, imagine that typewriter machine has a special set of instructions built-in, like "Print this sentence" or "Write the date". That's kind of like what a shell does. A shell (short for "shell script") is a program that runs inside the terminal and understands what you're telling it to do.
Think of the shell as an interpreter, taking your typed commands and figuring out what actions to take. It's like having a personal assistant who says, "Ah, you want me to list all the files in this directory? Okay, let me do that for you!"
When you open a terminal, it starts up a shell program (like Bash or Zsh) by default. This shell is responsible for:
Reading your input: When you type something into the terminal, the shell reads what you've written.
Understanding what you mean: The shell uses its built-in knowledge and rules to figure out what action you're trying to perform (e.g., "ls" means list files).
Executing the command: If the shell recognizes the command, it executes it, using various tools and utilities installed on your computer.
Displaying the output: The shell shows you the result of the command in the terminal window.
Here's an example:
You type ls (list files) into the terminal. The shell reads "ls" and says, "Ah, I know what that means! Let me list all the files in this directory."
The shell executes the "ls" command by using a built-in utility to scan the current directory for files. The shell displays the list of files in the terminal window.
Working with terminals and shells offers many benefits:
Powerful automation: With shell scripts, you can automate repetitive tasks or create custom tools for specific tasks.
Flexibility: Shells support various programming languages, allowing you to write your own scripts or use existing ones.
Portability: Terminal sessions are platform-independent, making it easy to transfer settings and scripts between different systems.
Improved productivity: By automating tasks and streamlining workflows, you can focus on more important things.
So, the terminal and shell work together to provide a powerful interface for interacting with your computer. The shell is like an intelligent assistant that understands what you're trying to do and executes the commands accordingly. With customization options available, you can tailor your shell experience to fit your needs and improve your productivity.
Now let's explore the various shells available on Windows, macOS, and Linux:
Command Prompt (cmd): The built-in command-line interpreter that comes with Windows. It's a simple shell that understands basic commands like "dir" for listing files and directories.
PowerShell: A more advanced shell developed by Microsoft, first released in 2006. PowerShell is designed to handle complex tasks and automation using its own scripting language (PS). It has become the default shell on newer Windows versions.
Windows Subsystem for Linux (WSL): Introduced with Windows 10, WSL allows you to run a Linux environment directly on Windows. This includes access to popular Linux shells like Bash, Zsh, and Fish.
Terminal: The built-in terminal application that comes with macOS. It's based on the Unix shell and supports various command-line utilities.
zsh: A popular alternative to the default Terminal shell, zsh is a Unix shell that offers improved features like autocorrect and spell-checking.
Linux:
Bash (Bourne-Again SHell): One of the most widely used shells on Linux systems, Bash is the default shell for many distributions, including Ubuntu, Debian, and Red Hat.
Zsh: As mentioned earlier, zsh is a popular alternative to Bash, offering improved features like autocorrect and spell-checking. Many Linux distributions, such as Arch Linux and Gentoo, use Zsh as their default shell.
Fish: A more modern shell that aims to be faster and more powerful than traditional shells. Fish is gaining popularity among developers and power users.
If you are on Windows I would suggest you might try Windows Subsystem for Linux.
As someone who can’t help opening his computers and messing around with the ram, storage etc. I have never use Apple products. From what I hear Apple Terminal is fine.
On Linux I use the Fish shell, but I wouldn’t recommend it. Almost all the advice you will get from the interwebs will assume you are using the Bash shell so go with that until you get the hang of things.
We learn best when we break things and then have to fix them. It doesn’t really matter which terminal or shell you use. Just start where you are, and follow a few youtube tutorials or other on-line projects. If you get stuck there are many free online AIs which will help and explain how to unstick yourself.