150+ Most Common Linux Commands With Examples
A rundown of the 150+ Linux commands you use most, from files and processes to networking, each with a copy-ready example.
Read article →If you often open a terminal on Linux or macOS, you've surely heard the term shell. But three names come up most often — SH, Bash, and ZSH — and more than a few people struggle to tell them apart. This article explains all three in full, from history to features, with a comparison table at the end.
A shell is the program that reads the commands you type in the terminal, executes them, and displays the result. Every command like ls, cd, or grep is actually processed by the shell.
echo "Hello, shell!"
There are many shells — Bourne shell, C shell, Korn shell, Fish, and more — but the three most commonly used are SH, Bash, and ZSH.
History: The oldest shell, created by Stephen Bourne at Bell Labs in 1977 for Unix version 7. The POSIX shell syntax standard still used today started here.
SH characteristics:
sh scripts the most portableImportant note: on many modern Linux distros (especially Debian and Ubuntu), /bin/sh is not the original Bourne shell but dash — a lightweight shell built for faster system boot. Scripts with the shebang #!/bin/sh still run fine because the POSIX syntax is the same.
#!/bin/sh
echo "This script runs on any POSIX shell"
History: Created by Brian Fox for the GNU project in 1989 as a replacement (and improvement) for the Bourne shell. The "again" in Bourne Again Shell refers to its predecessor. Bash is the default shell on almost every Linux distro.
Compared to SH:
sh syntax — sh scripts run unchanged in BashshCtrl+R$(), [[ ]] conditions, here-strings, aliases, and job controlPS1#!/bin/bash
# Typical bash feature: arrays
fruits=("apple" "orange" "banana")
echo "${fruits[1]}"
History: Created by Paul Falstad in 1990 while studying at Princeton. Zsh combines the best of Bash, Korn shell (ksh), and tcsh. Since macOS Catalina (2019), Zsh has replaced Bash as Apple's default shell.
Compared to Bash:
**/*.txt searches files recursively#!/bin/zsh
# Typical zsh feature: recursive glob search
ls **/*.log
The following commands show your active shell and your account's default shell:
echo $SHELL # default shell of this account
echo $0 # shell currently running
cat /etc/passwd | grep $(whoami)
A brief summary of their differences:
sh, feature-rich, and available everywhere — the safest shell for Linux beginners.| Aspect | SH | Bash | ZSH |
|---|---|---|---|
| Full name | Bourne Shell | Bourne Again Shell | Z Shell |
| Released | 1977 | 1989 | 1990 |
| Author | Stephen Bourne (Bell Labs) | Brian Fox (GNU) | Paul Falstad (Princeton) |
| License | proprietary (original) | GPL | MIT-like |
| Compatible with sh scripts | Yes (the original) | Yes | Yes |
| Tab completion | Not built-in | Yes | Best (menu, context-aware) |
| Command history | Limited | Yes | Advanced (sharing across terminals) |
| Arrays | No | Yes | Yes |
| Plugins & themes | None | Limited | Huge (oh-my-zsh, Starship) |
| Prompt customization | Minimal | Yes (via PS1) |
Outstanding |
| Default shell | POSIX standard (on Debian/Ubuntu: dash) | Linux (most distros) | macOS (Catalina+) |
| Best for | Portable system scripts | General Linux use | Power users |
| Main strength | Lightweight, universal | Balanced, highly available | Best interactive features |
| Main weakness | Light on interactive features | Less flashy than zsh | Heavier startup |
Tip: for scripts that must run across distros, use
shsyntax (shebang#!/bin/sh). For daily use, Bash is safe and sufficient; to maximize terminal productivity, migrate to Zsh.
A rundown of the 150+ Linux commands you use most, from files and processes to networking, each with a copy-ready example.
Read article →mdwn turns dozens of Linux commands into one tidy terminal menu. Here is what every menu does, plus an interactive browser demo you can try safely.
Read article →Inside Alpine Linux: why this 5 MB distro is the top choice for Docker images, what makes it different, and whether it can be a daily driver.
Read article →