Common Shell Flavors

When you open a terminal, you're actually interacting with a program called a shell. The shell interprets your commands and communicates with the operating system. But here's something that surprises many beginners: there isn't just one shell. Several exist, each with its own personality.

The Major Shells

Bash (Bourne Again Shell) is the most widely used shell in the world. It's the default on most Linux distributions and was the default on macOS until 2019. When you see tutorials with commands like ls, cd, or grep, they're usually written for bash.

Zsh (Z Shell) became macOS's default shell in 2019. It's highly compatible with bash but adds features like better autocompletion, spelling correction, and customization through frameworks like Oh My Zsh. Most bash commands work identically in zsh.

PowerShell is Windows' modern shell. Unlike bash and zsh, PowerShell uses a completely different syntax. Instead of ls to list files, you might use Get-ChildItem. PowerShell treats everything as objects rather than text, which makes it powerful but requires learning a different approach.

Fish (Friendly Interactive Shell) prioritizes user experience. It offers syntax highlighting, autosuggestions, and sensible defaults without configuration. Fish intentionally breaks compatibility with bash to provide a cleaner experience.

Core Concepts Transfer

Here's the good news: once you understand one shell, learning another becomes much easier. The concepts — navigating directories, running programs, redirecting output, writing scripts — remain the same. Only the specific syntax changes.

Think of shells like dialects of the same language. A Spanish speaker can understand Portuguese with some adjustment. Similarly, a bash user can adapt to zsh quickly because the underlying ideas are identical.

Which Shell Are You Using?

Modern macOS uses zsh by default. You can verify by typing echo $SHELL in your terminal.

Most Linux distributions default to bash. Check with echo $SHELL in your terminal.

Windows offers both Command Prompt (legacy) and PowerShell. PowerShell is the modern choice and comes pre-installed.

Practical Advice

For beginners, focus on learning bash or zsh — they're nearly identical for basic use. Most online tutorials, documentation, and examples assume one of these shells. Once you're comfortable, exploring PowerShell or fish becomes a matter of translating concepts you already understand.

See More

Further Reading

You need to be signed in to leave a comment and join the discussion