How this Bash track works
- Read-focused — no in-browser runner — copy commands into your own terminal (macOS Terminal, iTerm, WSL, or Linux). There is no playground Run button by design (
execution_profile: none). - Shell automation focus — variables, quoting, pipes, scripts, cron, SSH, Git hooks, and CI glue. Pair with the Git track and Tools; compare scripting depth with Python.
- Prerequisites — basic computer literacy; Intro to Programming or any language track helps. Finish Git intro before hooks/CI lessons.
Practice in a ~/bash-practice folder. Never run destructive commands on system paths. GNU/Linux and macOS flags may differ—check --help on your OS.
Install on your device (macOS, Linux, Windows)
Use your system terminal—no extra install on macOS/Linux. Windows users should enable WSL or Git Bash.
macOS
- Open Terminal or iTerm—bash/zsh is preinstalled.
- Create practice dir:
mkdir -p ~/bash-practice && cd ~/bash-practice
Linux
- Open your distro terminal—bash is default on most images.
mkdir -p ~/bash-practice && cd ~/bash-practice
Windows
- Recommended: WSL2 (
wsl --install) then Ubuntu bash. - Alternative: Git Bash from Git for Windows.
Verify: bash --version and echo hello in your terminal.
Bash (Bourne Again SHell) is the default command language on most Linux servers and macOS terminals. It lets you run programs, chain commands with pipes, automate tasks with scripts, and glue together the tools in your dev environment.
How this track works
This is a read-focused track: there is no in-browser runner. Copy each example into your own terminal (Terminal.app, iTerm, WSL, or a Linux console). Compare workflows with the Git track, editor and CLI habits in Tools, and scripting patterns in Python.
After Python, you already know variables and control flow—Bash applies those ideas to files, processes, and the operating system.
What you will learn
- Shell basics: commands, variables, quoting, control flow, functions, exit codes
- Files and text: paths, permissions, redirection, pipes, find, grep, text tools
- Scripting: arguments, arithmetic, arrays, parameter expansion, error handling
- DevOps glue: cron, environment variables, SSH, Git hooks, CI scripts
- Advanced topics: subshells, processes, xargs, bash vs sh, security habits
Safety note
Run examples in a practice folder you create. Avoid reckless rm -rf on broad paths. When a lesson shows destructive commands, read the path twice before pressing Enter.
Important interview questions and answers
- Q: What is Bash used for?
A: Running commands, automating file tasks, deploying software, and connecting CLI tools in development and operations. - Q: Why no playground runner?
A: Shell access on a shared server is a security risk—copy-paste into your local terminal is the safe default for this track.
Self-check
- In one sentence, what does a shell do between you and the OS?
- Name two other tracks that pair well with Bash.
Challenge
Try Bash in your terminal
- Open your system terminal.
- Run
echo "Bash track ready". - Run
bash --versionand note the version line.
Done when: you see your echo text and a bash version string.
Tip: Finish Tools and Git intros—Bash ties the terminal, version control, and automation together.
Interview prep
- What is Bash in one sentence?
A command shell and scripting language for automating CLI tasks and gluing Unix tools.
- Why is this track read-focused?
Running shell on a shared server is unsafe; learners copy commands into their own terminal.