Introduction to Bash
Learn what Bash is, its history, why it matters for system administration, and how it compares to other shells. Get started with the Linux command line.
📖 3 min read📅 2026-02-10Getting Started
What is Bash?
Bash (Bourne Again SHell) is the most widely used Unix/Linux shell and command language. It's the default shell on most Linux distributions and was the default on macOS until Catalina (which switched to Zsh).
Bash serves two purposes:
- Interactive Shell — A command-line interface where you type commands
- Scripting Language — Write scripts to automate tasks
A Brief History
- 1971 — Thompson Shell (the first Unix shell)
- 1977 — Bourne Shell (
sh) by Stephen Bourne at Bell Labs - 1978 — C Shell (
csh) by Bill Joy at UC Berkeley - 1983 — Korn Shell (
ksh) by David Korn at Bell Labs - 1989 — Bash by Brian Fox for the GNU Project (free replacement for
sh) - 2019 — macOS switches default to Zsh
Bash combines the best features of sh, csh, and ksh while adding its own improvements.
Why Learn Bash?
- Ubiquitous — Available on virtually every Linux/macOS/Unix system
- Server Management — Most servers run Linux; Bash is how you manage them
- DevOps Essential — CI/CD pipelines, Docker, Kubernetes all use Bash scripts
- Automation — Automate backups, deployments, system maintenance
- Text Processing — Powerful tools for processing logs, data, and configurations
- Career Growth — Required skill for SysAdmin, DevOps, SRE, and Cloud roles
Bash vs Other Shells
| Feature | Bash | Zsh | Fish | PowerShell |
|---|---|---|---|---|
| Default on Linux | ✅ | Some | No | No |
| POSIX compatible | ✅ | ✅ | ❌ | ❌ |
| Tab completion | Good | Excellent | Excellent | Good |
| Syntax highlighting | No (default) | Plugin | Built-in | Plugin |
| Scripting | Strong | Strong | Different | Strong |
| Pipeline type | Text | Text | Text | Objects |
| Learning resources | Abundant | Good | Growing | Good |
Key Concepts
Before diving in, here's what you'll learn:
- Commands — Built-in commands and external programs
- Files & Directories — Navigating and managing the filesystem
- Pipes & Redirection — Connecting commands and redirecting output
- Variables & Environment — Storing data and configuring the shell
- Scripting — Writing automated scripts with logic and loops
- Text Processing — Using grep, sed, awk, and other tools
- Process Management — Managing running processes and jobs
- Regular Expressions — Pattern matching and text manipulation
The Terminal vs Shell vs Console
These terms are often confused:
- Terminal (Terminal Emulator) — The window/application (e.g., GNOME Terminal, iTerm2, Windows Terminal)
- Shell — The program that interprets your commands (Bash, Zsh, Fish)
- Console — Historically, the physical hardware; now often used interchangeably with terminal
When you open a terminal application, it launches a shell (usually Bash) inside it.
What You'll Build
By the end of these tutorials, you'll be able to:
- Navigate the Linux filesystem efficiently
- Write Bash scripts to automate system tasks
- Process text data with grep, sed, and awk
- Manage processes and system services
- Create cron jobs for scheduled tasks
- Write deployment and backup scripts
- Handle errors and debug scripts
Let's start by setting up your Bash environment!