10 topics · 42 bytes · ~6 hours

The Linux Path

From your first command to scripting your own tools.

Where it leadsYou're at home in a terminal: you can find, change and automate anything on a Linux machine.

0% complete·0 of 42 bytes

Start the path

Your progress is saved in this browser, and in your account when you sign in. Topics you finish count on every path they're on.

  1. Level OneIntermediate

    System Architecture

    3 bytes · ~30 min

    Hardware, the boot process, and moving between runlevels and systemd targets.

    You'll learn

    • /proc, /sys and /dev are built by the kernel: lspci, lsusb and lsmod read them.
    • modprobe loads a driver with its dependencies; /etc/modprobe.d/ blacklists or tunes it.
    • Boot: firmware, GRUB, kernel, initramfs, then init (PID 1) starts everything else.
    • Runlevels are numbers, systemd targets are names: 3 is multi-user, 5 is graphical.
    • shutdown warns users and stops things cleanly: SIGTERM first, SIGKILL only if needed.
    1. Byte 1 Determine and configure hardware settings Find out what hardware is in a Linux box, which driver runs it, and how to switch devices and modules on or off. ~11 min
    2. Byte 2 Boot the system Follow a Linux machine from power button to login prompt: firmware, boot loader, kernel, initramfs and init. ~10 min
    3. Byte 3 Change runlevels / boot targets and shutdown or reboot system Move between runlevels and systemd targets, pick the default, and shut down or reboot without surprising anyone. ~9 min
  2. Level TwoIntermediate

    Linux Installation and Package Management

    6 bytes · ~44 min

    Disk layout, boot loaders, shared libraries, Debian and RPM packages, and Linux as a virtual machine.

    You'll learn

    • Plan partitions by use: /, /boot (or the ESP), /home, /var and swap. LVM makes resizing easy.
    • GRUB 2: edit /etc/default/grub, then run grub-mkconfig. Never edit grub.cfg by hand.
    • ldd shows a program’s libraries; ldconfig rebuilds the cache from /etc/ld.so.conf.
    • dpkg and rpm handle local files; apt, dnf/yum and zypper fetch dependencies from repositories.
    • After cloning a VM, regenerate SSH host keys and the machine ID. cloud-init sets up new instances.
    1. Byte 1 Design hard disk layout Which partitions a Linux system needs, where they get mounted, how /boot and the ESP fit the firmware, and the basics of LVM. ~8 min
    2. Byte 2 Install a boot manager GRUB Legacy and GRUB 2: where they live, how to configure and install them, and how to talk to them at boot time. ~7 min
    3. Byte 3 Manage shared libraries What shared libraries are, where Linux keeps them, and how ldd, ldconfig, /etc/ld.so.conf and LD_LIBRARY_PATH decide which ones a program loads. ~5 min
    4. Byte 4 Use Debian package management Install, upgrade, remove and inspect .deb packages with dpkg, apt-get, apt-cache and apt, and find which package holds a file. ~8 min
    5. Byte 5 Use RPM and YUM package management Install, upgrade, remove and query RPM packages with rpm, yum/dnf and zypper, check signatures, and find which package owns a file. ~8 min
    6. Byte 6 Linux as a virtualization guest Virtual machines, containers and cloud instances from the inside: guest drivers, images, what to reset when you clone, and cloud-init. ~8 min
  3. Level ThreeBeginner

    GNU and Unix Commands

    8 bytes · ~76 min

    The command line: filters, files, pipes and redirects, processes, regular expressions and vi.

    You'll learn

    • Commands join with ; && ||. Exit status 0 means success, and export passes variables to children.
    • Small filters do one job each: sort | uniq -c | sort -nr answers ‘what’s most common?’
    • 0 stdin, 1 stdout, 2 stderr. > overwrites, » appends, > file 2>&1 catches both.
    • kill sends SIGTERM (15) first; SIGKILL (9) can’t be caught. Nice runs from -20 to 19.
    • grep -E and sed -E speak extended regex. In vi: i to type, Esc, then :wq or :q!
    1. Byte 1 Work on the command line Bash basics for LPIC-1: running and chaining commands, quoting, variables and export, PATH, type and which, man, uname and history. ~12 min
    2. Byte 2 Process text streams using filters cat, head, tail, sort, uniq, cut, paste, tr, wc, nl, od, split, sed and checksums: small tools that reshape text. ~9 min
    3. Byte 3 Perform basic file management ls, cp, mv, rm, mkdir, touch, wildcards, find, tar, cpio, dd and gzip, bzip2 and xz: everyday file work on Linux. ~12 min
    4. Byte 4 Use streams, pipes and redirects Standard input, output and error, redirecting them to files, piping commands together, tee, command substitution and xargs. ~8 min
    5. Byte 5 Create, monitor and kill processes Foreground and background jobs, nohup, screen and tmux, ps, top, free, uptime and watch, and signals with kill, pkill and killall. ~11 min
    6. Byte 6 Modify process execution priorities Nice values from -20 to 19: start programs with nice, change running ones with renice or top, and read priorities in ps and top. ~6 min
    7. Byte 7 Search text files using regular expressions Basic and extended regular expressions with grep, egrep, fgrep, sed and find: anchors, classes, quantifiers, groups and substitutions. ~10 min
    8. Byte 8 Basic file editing Survive and thrive in vi: modes, moving around, inserting, deleting, copying, searching, saving, plus nano, Emacs and the EDITOR variable. ~8 min
  4. Level FourBeginner

    Devices, Linux Filesystems, Filesystem Hierarchy Standard

    6 bytes · ~50 min

    Partitions and filesystems, checking and mounting them, permissions, links and where files live.

    You'll learn

    • MBR: 4 primary partitions and 2 TiB. GPT: 128 partitions, huge disks, needed for UEFI.
    • mkfs.TYPE makes a filesystem, mkswap makes swap. Check them unmounted with fsck or xfs_repair.
    • Mount by UUID or LABEL in /etc/fstab: device, mount point, type, options, dump, pass.
    • r=4 w=2 x=1. SUID 4, SGID 2, sticky 1. The umask takes bits away from 666 and 777.
    • Hard links share an inode, symlinks store a path. /etc config, /var data, /usr/local yours.
    1. Byte 1 Create partitions and filesystems Split a disk with MBR or GPT using fdisk, gdisk and parted, then put ext4, XFS, FAT, exFAT, Btrfs or swap on it. ~10 min
    2. Byte 2 Maintain the integrity of filesystems Watch free space and inodes with df and du, check and repair ext and XFS filesystems, and tune them with tune2fs. ~9 min
    3. Byte 3 Control mounting and unmounting of filesystems Attach filesystems by hand with mount, at boot with /etc/fstab or systemd units, by label or UUID, and let users mount USB sticks. ~8 min
    4. Byte 4 Manage file permissions and ownership Read and set rwx permissions with chmod, change owners with chown and chgrp, use SUID, SGID and the sticky bit, and pick a umask. ~8 min
    5. Byte 5 Create and change hard and symbolic links Give one file several names with hard links, point to it with symlinks, tell them apart, and know when to link instead of copy. ~7 min
    6. Byte 6 Find system files and place files in the correct location The Filesystem Hierarchy Standard: what lives where, where your own files belong, and how to find anything with find, locate, whereis, which and type. ~8 min
  5. Level FiveIntermediate

    Shells and Shell Scripting

    2 bytes · ~23 min

    Customizing the shell environment and writing your own Bash scripts.

    You'll learn

    • Login shells read /etc/profile, then the first of ~/.bash_profile, ~/.bash_login, ~/.profile.
    • Interactive shells read ~/.bashrc: the home of your aliases and functions.
    • export puts a variable in the environment, so child processes inherit it.
    • Exit status 0 means success: && runs on success, || on failure.
    • A script needs a #! line, read and execute rights, and Linux ignores SUID on it.
    1. Byte 1 Customize and use the shell environment Which startup files Bash reads and when, how variables, PATH, aliases and functions work, and how /etc/skel sets up new users. ~10 min
    2. Byte 2 Customize or write simple scripts Write Bash scripts with the right shebang, tests, loops, read, seq and command substitution, check exit codes, mail root when something fails, and install scripts safely. ~13 min
  6. Level SixIntermediate

    User Interfaces and Desktops

    3 bytes · ~25 min

    X11, graphical desktops, remote displays and accessibility.

    You'll learn

    • In X11 the server owns screen and keyboard; programs are clients, local or remote.
    • DISPLAY=host:n.s finds the X server; display n listens on TCP port 6000 + n.
    • Override Xorg with small files in /etc/X11/xorg.conf.d/; read errors in Xorg.0.log.
    • Remote desktops: ssh -X, XDMCP (UDP 177), VNC (5900+n), Spice for VMs, RDP (3389).
    • Accessibility: Orca, braille via BRLTTY, zoom, on-screen keyboard, sticky and slow keys.
    1. Byte 1 Install and configure X11 How the X Window System is built, where its config lives, and how to show programs on another screen safely. ~11 min
    2. Byte 2 Graphical Desktops GNOME, KDE Plasma and Xfce at a glance, and the protocols that put a desktop on another screen: XDMCP, VNC, Spice and RDP. ~7 min
    3. Byte 3 Accessibility Themes, screen readers, braille, magnifiers and keyboard helpers that make a Linux desktop usable for everyone. ~7 min
  7. Level SevenIntermediate

    Administrative Tasks

    3 bytes · ~30 min

    Users and groups, scheduled jobs with cron, at and systemd timers, and localisation.

    You'll learn

    • Accounts live in /etc/passwd, /etc/shadow and /etc/group. Manage them with useradd and usermod.
    • usermod -aG adds a group. -G without -a replaces every supplementary group.
    • Crontab fields: minute, hour, day of month, month, day of week. System crontabs add a user field.
    • at runs a job once, cron repeats it, and a systemd .timer starts the .service with its name.
    • LC_ALL beats LC_* beats LANG; /etc/localtime links to the zone file in /usr/share/zoneinfo/.
    1. Byte 1 Manage user and group accounts and related system files Create, change and remove users and groups, and read the files where Linux keeps them. ~11 min
    2. Byte 2 Automate system administration tasks by scheduling jobs Run commands on a schedule with cron, once later with at, and the modern way with systemd timers. ~10 min
    3. Byte 3 Localisation and internationalisation Locales, LANG and LC_* variables, time zones and TZ, and character encodings from ASCII to UTF-8. ~9 min
  8. Level EightIntermediate

    Essential System Services

    4 bytes · ~34 min

    System time, logging with syslog and journald, mail transfer agents and printing.

    You'll learn

    • Keep the hardware clock in UTC and let ntpd or chrony sync the system clock from pool.ntp.org.
    • /etc/localtime links to a zone in /usr/share/zoneinfo; timedatectl sets time, zone and NTP.
    • Syslog rules are facility.priority plus an action; journalctl filters by -b, -u, -p and –since.
    • Edit /etc/aliases then run newaliases; ~/.forward redirects one user’s mail.
    • CUPS queues: lpadmin adds printers, lp/lpr print, lpq/lpstat list, cancel/lprm remove jobs.
    1. Byte 1 Maintain system time Read and set the clock, keep the hardware clock in UTC, pick a timezone and sync with NTP using ntpd or chrony. ~9 min
    2. Byte 2 System logging Read and filter the systemd journal, write rsyslog rules with facilities and priorities, and keep logs from filling the disk with logrotate. ~10 min
    3. Byte 3 Mail Transfer Agent (MTA) basics What an MTA does, the big three (Postfix, Sendmail, Exim), and how to set up aliases, forwarding and check the mail queue. ~7 min
    4. Byte 4 Manage printers and printing Add local and network printers to CUPS, manage print queues with lp and the old lpr commands, and fix the usual printing problems. ~8 min
  9. Level NineIntermediate

    Networking Fundamentals

    4 bytes · ~41 min

    IP addressing and protocols, network configuration, troubleshooting and client-side DNS.

    You'll learn

    • A /n network has 2^(32-n) addresses; private ranges are 10/8, 172.16/12 and 192.168/16.
    • TCP connects and guarantees delivery, UDP just sends, ICMP carries ping and errors.
    • nmcli saves profiles that survive reboots; ip changes are gone after a restart.
    • Debug bottom up: link, address, gateway, route, DNS, then the service port.
    • getent follows /etc/hosts and nsswitch.conf; dig and host only ask DNS.
    1. Byte 1 Fundamentals of internet protocols IPv4 addresses, masks and CIDR, private ranges, TCP, UDP and ICMP, the ports you must know, and what IPv6 changes. ~11 min
    2. Byte 2 Persistent network configuration Give a Linux host a name, an address, a gateway and DNS that survive a reboot, with NetworkManager, ifupdown and systemd-networkd. ~9 min
    3. Byte 3 Basic network troubleshooting Read and change addresses and routes with ip, find listening ports with ss, test paths with ping, traceroute, tracepath and netcat, and know the old net-tools. ~12 min
    4. Byte 4 Configure client side DNS How Linux turns names into addresses: /etc/hosts, resolv.conf and nsswitch.conf, querying with host, dig and getent, and where systemd-resolved fits in. ~9 min
  10. Level TenIntermediate

    Security

    3 bytes · ~30 min

    Security administration, securing a host, and encryption with OpenSSH and GnuPG.

    You'll learn

    • Audit SUID/SGID files with find, and age passwords with chage and passwd.
    • Find open ports with ss, netstat, lsof, fuser and nmap; switch off what you don’t need.
    • Hashes live in root-only /etc/shadow; /etc/nologin blocks every login but root’s.
    • sudo runs one command as root with your own password; edit /etc/sudoers only with visudo.
    • SSH keys and tunnels, plus gpg to encrypt, sign, verify and revoke.
    1. Byte 1 Perform security administration tasks Find risky SUID files, set password aging, spot open ports, limit users, see who logged in, and set up sudo. ~11 min
    2. Byte 2 Setup host security How shadow passwords work, how to switch off services you don't use, and what TCP wrappers do. ~8 min
    3. Byte 3 Securing data with encryption Use OpenSSH keys, agents and tunnels, and encrypt, sign and verify files with GnuPG. ~11 min
LINUX PATH

Finish the Linux Path to reach

You're at home in a terminal: you can find, change and automate anything on a Linux machine.

Finish every topic on this path to earn the Linux Path badge.

0% complete·0 of 42 bytes

Other paths

Search posts and bytes

Optional account

Keep your progress everywhere

Everything on AminBytes is free to read, with or without an account. Sign in only if you want your commits, streak and merged topics saved, on every device.

or

We keep only your name, avatar and which bytes you finished, and you can delete it all anytime. Privacy