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
~10 min
02
~10 min
03
~9 min
04
~9 min
05
~7 min
06
~9 min
07
~9 min
08
~9 min
09
~9 min
10
~7 min
11
~7 min
12
~7 min
13
~8 min
14
~7 min
15
~6 min
16
~6 min
17
~7 min
18
~7 min
19
~6 min
20
~10 min
21
~7 min
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.
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.
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.
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.
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.
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.
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.
Searching and Finding Things: grep and find
Learn to search inside files for text with grep and find files across the system with find.
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.
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.
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.
Writing Your First Bash Script
Write, save and run your first Bash script, and understand the shebang line, executable permissions and basic script structure.
Conditionals: Making Decisions in Scripts
Make your scripts decide things with if, elif, else, the test command and the case statement.
Loops: Repeating Actions in Scripts
Repeat commands automatically with for, while and until loops, and control them with break and continue.
Functions in Bash Scripts
Organise scripts into reusable functions, pass arguments to them and understand the difference between exit codes and printed output.
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.
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.
Scheduling Tasks with Cron
Run scripts and commands automatically at set times with cron and its five-field schedule.
Advanced Bash: Arrays, String Manipulation, and Regular Expressions
Level up your scripting with arrays, string tricks, arithmetic, pattern matching and here documents.
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.
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.