learn-linux
A hands-on guide to learning Linux from the command line up. No prior experience assumed — by the end you'll be comfortable navigating the filesystem, managing files and processes, installing software, working with the network, and writing your own shell scripts.
Each chapter is a standalone Markdown file. They're numbered so you can read them in order, but if you already know the basics, jump straight to what you need.
Contents
| # | Chapter | What you'll learn |
|---|---|---|
| 01 | Getting Started | What Linux is, distros, the shell, and how to get help |
| 02 | The Filesystem & Navigation | The directory tree, paths, and moving around |
| 03 | File Management | Creating, copying, moving, deleting, linking, and archiving files |
| 04 | Users & Permissions | Users, groups, chmod/chown, and sudo |
| 05 | The Shell & Bash | Variables, redirection, pipes, globbing, and your config |
| 06 | Text Processing | grep, sed, awk, cut, sort, and friends |
| 07 | Process Management | Viewing, controlling, and killing processes; systemd |
| 08 | Package Management | Installing software on Debian, Fedora, Arch, and more |
| 09 | Networking | IP, DNS, SSH, transferring files, and firewalls |
| 10 | Shell Scripting | Writing real Bash scripts with logic and loops |
How to use this guide
- Open a terminal. Everything here is meant to be typed, not just read. Reading about a command teaches you almost nothing; running it teaches you a lot.
- Experiment in a safe place. Make a scratch directory (
mkdir ~/sandbox) and play there so you can't break anything important. - Read the manual. When a command is new to you, run
man <command>or<command> --help. Chapter 01 covers how to get help. - Do the exercises. Most chapters end with a short set of tasks. Don't skip them.
Conventions
Commands you type are shown in code blocks:
echo "hello"A leading
$in examples represents your shell prompt (you don't type it). A leading#means the command needs root/sudo.Placeholders are written in
ANGLE_BRACKETS, e.g.cd <directory>— replace the whole thing, brackets included, with a real value.Output is sometimes shown below a command, indented or in the same block.
A note on distributions
Linux comes in many flavors ("distributions" or distros). The core command-line tools in this guide work almost everywhere. The main thing that differs between distros is the package manager (Chapter 08), so that chapter covers several. Examples are tested against modern Debian/Ubuntu, Fedora, and Arch.
License
Free to use, copy, and adapt. Attribution appreciated but not required.