Learn Linux

Using and administering Linux systems from the command line

28 lessons · 5 hours · 4 levels · covers Linux kernel 6.12, systemd 257

Linux is the operating system behind most servers, cloud instances, containers and embedded devices. This curriculum covers working with it from the command line: the filesystem, users and permissions, processes and services, packages, logs, networking and storage, up to the kernel features (namespaces and cgroups) that containers are built on. It is the practical foundation for DevOps, backend and infrastructure work.

Before you start

Linux builds on these; the tree links to the exact lessons you need.

How deep do you want to go?

1. EssentialsRead and write simple code, do the everyday basics10 lessons · 2 hours in total
2. PracticalUse it productively at work, with the usual idioms18 lessons · 3 hours in total
3. AdvancedThe less common features, performance and trade-offs24 lessons · 4 hours in total
4. ExpertInternals and the edge cases experts know28 lessons · 5 hours in total

The Linux tree

LinuxKernel, distributions and the shellKernel, distributionsand the shellThe filesystem hierarchyThe filesystemhierarchyNavigating and managing filesNavigating andmanaging filesViewing files and searching textViewing files andsearching textUsers, groups and rootUsers, groups androotFile permissions: chmod and chownFile permissions:chmod and chownProcesses: ps, top and friendsProcesses: ps, topand friendsSignals and stopping processesSignals and stoppingprocessesInstalling software with package managersInstalling softwarewith package mana…Disk and memory usage: df, du, freeDisk and memoryusage: df, du, freeInodes, hard links and symlinksInodes, hard linksand symlinksumask, setuid, setgid and sticky bitumask, setuid, setgidand sticky bitManaging users and sudo rulesManaging users andsudo rulesServices with systemctlServices withsystemctlLogs with journalctlLogs with journalctlScheduling: cron and systemd timersScheduling: cron andsystemd timersNetworking tools: ip, ss, dig, curlNetworking tools: ip,ss, dig, curlArchives and compression: tar, gzip, zstdArchives andcompression: tar, g…The shell and running commandsThe shell and runningcommandsPipelinesPipelinesWriting and running a scriptWriting and running ascript
Essentials and Practical shown (18 of 28 lessons); the full list is below. Click a lesson to read it.

All 28 lessons, in order

Linux basics

  1. Kernel, distributions and the shell · Essentials · 7 min

    What Linux actually is: the kernel, the userland on top of it, and how distributions package them.

Files and the filesystem

  1. The filesystem hierarchy · Essentials · 8 min

    One tree rooted at /: what lives in /etc, /var, /home, /usr, /tmp, /proc and /dev.

  2. Navigating and managing files · Essentials · 10 min

    Move around with cd and ls, and create, copy, move, find and delete files and directories.

  3. Viewing files and searching text · Essentials · 9 min

    Read files with cat, less, head and tail, follow logs live and search them with grep.

  4. Inodes, hard links and symlinks · Practical · 10 min

    How files really work: inodes hold the data and metadata, names are links to them, and symlinks are paths.

  5. Archives and compression: tar, gzip, zstd · Practical · 9 min

    Bundle directories with tar, compress with gzip, xz or zstd, and list or extract archives safely.

Users and permissions

  1. Users, groups and root · Essentials · 8 min

    How Linux identifies users and groups, what root is, and how sudo grants admin rights safely.

  2. File permissions: chmod and chown · Essentials · 12 min

    Read rwx permission strings, change them with symbolic and octal chmod, and change ownership with chown.

  3. umask, setuid, setgid and sticky bit · Practical · 10 min

    Default permissions via umask, and the special bits that make passwd work, shared group folders and a safe /tmp.

  4. Managing users and sudo rules · Practical · 10 min

    Create and modify users and groups, grant sudo rights with drop-in files, and lock or remove accounts.

Processes and services

  1. Processes: ps, top and friends · Essentials · 10 min

    Every running program is a process with a PID and a parent; list and monitor them with ps, top and pgrep.

  2. Signals and stopping processes · Essentials · 9 min

    Ask processes to stop or reload with signals: SIGTERM, SIGKILL, SIGINT, SIGHUP, SIGSTOP and SIGCONT.

  3. Services with systemctl · Practical · 10 min

    Start, stop, restart, reload, enable and inspect services with systemd's systemctl.

  4. Troubleshooting performance · Advanced · 14 min

    Diagnose a slow machine methodically: load, CPU, memory, swap, disk I/O and the OOM killer.

  5. Writing systemd unit files · Advanced · 14 min

    Turn your own program into a supervised service with a unit file: dependencies, restarts, users, environment and hardening.

Packages, logs and scheduling

  1. Installing software with package managers · Essentials · 9 min

    Install, update, search and remove software with apt on Debian/Ubuntu and dnf on Fedora/RHEL.

  2. Logs with journalctl · Practical · 10 min

    Query the systemd journal by unit, time, priority and boot, follow logs live, and manage journal size.

  3. Scheduling: cron and systemd timers · Practical · 12 min

    Run jobs on a schedule with crontab syntax or systemd timers, and avoid the environment pitfalls.

Disks and storage

  1. Disk and memory usage: df, du, free · Essentials · 8 min

    Check free disk space with df, find what uses it with du, and read memory usage correctly with free.

  2. Block devices, filesystems and mounts · Advanced · 12 min

    Identify disks with lsblk, create filesystems, mount them by UUID and make mounts permanent with fstab.

  3. Partitions and LVM · Advanced · 14 min

    Partition disks with GPT, and pool them with LVM to resize volumes online and take snapshots.

Networking

  1. Networking tools: ip, ss, dig, curl · Practical · 12 min

    Inspect interfaces, routes, listening ports and DNS, and test connectivity layer by layer.

  2. Firewalls: nftables, ufw and firewalld · Advanced · 12 min

    Filter incoming traffic with ufw or firewalld, and understand the nftables rules underneath.

Kernel and internals

  1. /proc, /sys and sysctl · Advanced · 12 min

    Read process and system information straight from /proc and /sys, and tune kernel parameters with sysctl.

  2. The boot process and kernel modules · Expert · 14 min

    From firmware to login prompt: bootloader, kernel, initramfs, systemd targets, and loading kernel modules.

  3. Namespaces: how containers isolate · Expert · 15 min

    PID, network, mount, UTS, IPC, user and cgroup namespaces, explored with unshare, nsenter and ip netns.

  4. cgroups v2: limiting resources · Expert · 14 min

    Control groups organise processes in a tree and limit their CPU, memory, I/O and process count; systemd and containers use them.

  5. System calls and tracing with strace · Expert · 14 min

    See exactly what a program asks the kernel to do with strace, and when to reach for lsof, perf and eBPF tools.