Home / Shell
Shell
The shell as a daily tool: bash and zsh, from a first command to a backup script. Navigation, files, permissions, pipes, variables, quoting, scripts, jobs, history and aliases. Every example runs for real.
Every Linux or Mac computer already has a shell waiting in its terminal. Learning it turns typing one command at a time into moving files, searching text and running small scripts with confidence. This course starts with a single command and ends with a backup script you wrote yourself.
Course contents
Work top to bottom — the sidebar is the course. Topics later in the list assume the ones before them.
First Steps
Start: Shell Introduction ❯Moving Around
Start: Shell Where You Are ❯Making and Moving Files
- Shell Making Folders
- Shell Making Files
- Shell Copying Files
- Shell Moving and Renaming
- Shell Deleting Files
Reading and Searching
- Shell Viewing Files
- Shell Paging Through Files
- Shell Head and Tail
- Shell Finding Files
- Shell Searching Inside Files
Reading and Changing Permissions
Start: Shell Reading Permissions ❯Redirecting and Piping
Start: Shell Redirection ❯Sorting and Changing Text
Start: Shell Sorting and Counting ❯Shell Variables and Words
- Shell Variables
- Shell Environment Variables
- Shell Quoting
- Shell Expansion
- Shell Command Substitution
Decisions and Loops
Start: Shell If Statements ❯Writing Scripts
- Shell Your First Script
- Shell Script Arguments
- Shell Functions
- Shell Exit Codes
- Shell Debugging Scripts
Jobs, History and Shortcuts
Start: Shell Jobs ❯Making It Yours
Start: Shell Customising Your Shell ❯Shell Capstone: A Backup Script
Beginner · ⏱ 6 min · standalone lesson
Learn Shell
A shell is a program that takes typed commands and runs them on the computer. The terminal is the window you type into; the shell is the program inside it that reads each line, finds the command and shows the result. Bash and zsh are the two shells this course uses, and most lessons work the same in both.
People who work in a terminal reach for the shell dozens of times a day: to move files, check what changed, search logs, start programs and tidy folders. A few commands replace minutes of clicking, and a short script replaces a whole afternoon of repeated typing. The shell is also the tool every other command-line program is launched from, so learning it first makes every later tool easier.
Fifty lessons in twelve groups teach the shell as a daily tool, not as a programming language. Navigation and files come first, then searching, permissions, redirection, pipes and the text tools. Variables, quoting, decisions and loops follow, then first scripts, jobs, history, aliases and customisation. A backup script caps the course, built from the pieces the lessons taught.
What you will learn
These are the capabilities the contents build toward, group by group:
- Tell the shell from the terminal, and Bash from zsh and sh
- Move around the filesystem and list files in detail
- Make, copy, move and delete files and folders safely
- Read files, page through them, and find files by name
- Search inside files with grep and read permissions with ls -l
- Redirect output and errors, and chain commands with pipes
- Sort, count, replace and pick columns with sort, wc, sed and awk
- Store values in variables and share them with export
- Quote words so spaces and special characters survive
- Branch with if and case, and repeat work with for and while
- Write, run and debug a first script with arguments and functions
- Manage jobs, history and aliases, and shape the shell to your taste
Who this Shell course is for
No programming background is assumed. Early lessons explain the prompt, the first commands and getting help before any file is moved. If you can open a terminal window, you can begin.
The course also suits people who paste shell commands from the internet nervously. Understanding quoting, expansion and permissions turns borrowed one-liners into commands you can judge. Windows users can follow along through a Linux environment or subsystem.
Total lesson time reaches three hours and twenty-five minutes. The scripting groups run longer than the early navigation material, and the capstone pulls the whole course together in one script.
How this course works
Every example was run for real on a Linux machine with Bash 5.2 and zsh 5.9, and the stated output is the observed output. Where a command's output varies by machine, the lesson says so or shows only the stable part. Nothing is invented.
Zsh differences are called out where they matter: recursive globbing, print, glob qualifiers and completion. Bash stays the default, so a lesson that works the same in both shells says so once and moves on.
An exercise follows each lesson, and every answer explains itself. Many exercises ask you to predict output, a habit that catches quoting mistakes before a real filesystem does.
Completed lessons are remembered by your browser on this device alone. The course carries no price and never asks you to create an account.
Frequently asked questions
Is the shell the same thing as the terminal?
Not quite. The terminal is the window you type into, while the shell is the program inside it that reads your commands and runs them. Bash and zsh are shells; the terminal is the window around them.
Is this Shell course free to take?
Yes, all fifty lessons including the capstone script are completely free. Exercises and their explanations are part of that. You will not meet a checkout or a sign-up form.
How long does Shell Beginner take?
The lessons total 205 minutes. Working through one group per session spreads the course across about two weeks. The scripting groups run longer than the early navigation material.
Do I need Linux to learn the shell here?
A Mac terminal works immediately, since macOS ships a shell environment. On Windows, the Linux subsystem provides the same commands. Reading the lessons themselves needs nothing beyond a browser.
What is the difference between Bash and zsh?
Both are shells that run the same everyday commands. Zsh adds stronger completion, recursive globbing and friendlier customisation, and it is the default shell on modern Macs. This course is bash-first and calls out the zsh differences where they matter.
What comes after Shell Beginner?
Bash Beginner teaches scripting in depth: tests, loops, functions, arrays and the text tools as a programming language. Linux Beginner teaches the operating system behind the terminal: users, disks, networking and packages.
Next steps
- Bash Beginner ❯ — Scripting in depth: tests, loops, functions, arrays and the text tools, taught as a programming language.
- Linux Beginner ❯ — The operating system behind the terminal: users, disks, networking and packages, one command at a time.
- Git Beginner ❯ — Save every version of your work: snapshots, branches, merges and GitHub, from the same terminal.