Beginner 21 lessons

Bash and the Command Line for Beginners

Learn to work in the terminal like a real developer or sysadmin. Navigate the filesystem, manage files, automate tasks, and write your own Bash scripts from scratch. No experience needed.

Lessons

Work through these in order for the best experience.

01
What is the Command Line and Why Learn It?
Understand what the terminal, shell and Bash actually are, and why almost every developer and IT person ends up learning them.
~10 min
02
Getting Started: Opening a Terminal and Choosing a Shell
Open a terminal on Linux, macOS or Windows, check which shell you are running, read the prompt and type your first commands.
~10 min
03
Navigating the Filesystem
Learn how files and folders are organised on Linux and macOS, and how to move around confidently with pwd, ls and cd.
~9 min
04
Creating, Copying, Moving, and Deleting Files
Learn the everyday commands for managing files and folders: touch, mkdir, cp, mv and rm, plus wildcards for working with many files at once.
~9 min
05
Viewing and Reading File Contents
Learn to read files right in the terminal using cat, less, head and tail, plus handy tools like wc, file and diff.
~7 min
06
Understanding File Permissions and Ownership
Learn how Linux decides who can read, write or run a file, and how to change permissions and ownership with chmod and chown.
~9 min
07
Redirection, Pipes, and Combining Commands
Learn to send output to files, feed files into commands, and chain commands together with pipes. This is where the shell gets its real power.
~9 min
08
Searching and Finding Things: grep and find
Learn to search inside files for text with grep and find files across the system with find.
~9 min
09
Text Processing with sed and awk
Go beyond searching and start transforming text: find and replace with sed, column work with awk, plus sort, uniq and cut.
~9 min
10
Environment Variables, PATH, and Shell Configuration
Understand environment variables, how PATH lets you run commands from anywhere, and how to customise your shell with .bashrc and aliases.
~7 min
11
Quoting, Variables, and Command Substitution
Learn the difference between single and double quotes, how to escape special characters, and how to capture the output of one command inside another.
~7 min
12
Writing Your First Bash Script
Write, save and run your first Bash script, and understand the shebang line, executable permissions and basic script structure.
~7 min
13
Conditionals: Making Decisions in Scripts
Make your scripts decide things with if, elif, else, the test command and the case statement.
~8 min
14
Loops: Repeating Actions in Scripts
Repeat commands automatically with for, while and until loops, and control them with break and continue.
~7 min
15
Functions in Bash Scripts
Organise scripts into reusable functions, pass arguments to them and understand the difference between exit codes and printed output.
~6 min
16
Reading Input and Handling Script Arguments
Ask users for input with read, accept arguments and flags when a script is launched, and exit with meaningful status codes.
~6 min
17
Process Management and Job Control
See what is running on your system, stop misbehaving programs, and run tasks in the background while you keep working.
~7 min
18
Scheduling Tasks with Cron
Run scripts and commands automatically at set times with cron and its five-field schedule.
~7 min
19
Advanced Bash: Arrays, String Manipulation, and Regular Expressions
Level up your scripting with arrays, string tricks, arithmetic, pattern matching and here documents.
~6 min
20
Building a Real Project: Automated Backup Script
Combine everything from this course into one working script that backs up a folder, compresses it, timestamps it, logs its work and is ready to schedule.
~10 min
21
What to Learn Next
You finished the fundamentals of Bash and the command line. Here is where to go next depending on what you want to build or work with.
~7 min