Skip to main content

Introduction to Linux

Learn Linux step by step: the command line, files and permissions, apt and dnf, users and sudo, processes, networking, Bash scripts and systemd.

Linux runs most of the servers on the internet, nearly every container, every Android phone and all of the world's fastest supercomputers. If you deploy software, operate infrastructure or debug production issues, sooner or later you sit in front of a Linux shell and need to find a log, free some disk space, restart a service or work out why a port does not answer.

This guide teaches those skills from the ground up. It starts with what Linux is and how to get a system to practise on, then covers the command line, the file system and permissions, installing software, users and sudo, processes and services, networking, Bash scripting, and the day-to-day work of running a server. Each part builds on the previous one, with a small practice website, its logs and a backup script that carry through from Part 3 to Part 10.

What You'll Learn

  1. What Is Linux? The Kernel, Distributions and Their History: the kernel and the software around it, distribution families, support lifetimes, and how to choose.
  2. Getting Started: Install Linux in a VM, WSL, the Cloud or on Hardware: Multipass, VirtualBox, UTM, WSL, a cloud server or a dual boot, and the first steps after installing.
  3. Linux Command Line Basics: moving around, managing files, reading logs, find, grep, pipes, redirection and exit codes.
  4. Linux File System Hierarchy and File Permissions: /etc, /var, /usr and /proc, chmod and chown, special bits, links, disk usage and mounting.
  5. Package Management: apt, dnf, Snap and Flatpak: install and update software, add third-party repositories the current way, and avoid broken systems.
  6. User and Group Management: useradd, groups, /etc/passwd and /etc/shadow, sudo rules, SSH keys and service accounts.
  7. Process Management: ps, top, signals, priorities, load and memory, systemd services and cgroups.
  8. Networking in Linux: ip, ss, DNS, tcpdump, nftables, ufw and firewalld in a practice network you build yourself.
  9. Bash Shell Scripting Basics: variables, quoting, conditions, loops, functions, error handling, ShellCheck, and a complete backup script.
  10. Linux System Administration Basics: unit files, timers and cron, journalctl, automatic updates, backups, SSH hardening and troubleshooting.

Which Versions This Guide Uses

The examples use Ubuntu 24.04 LTS, a long-term support release with security updates until May 2029, and point out where Debian 13, Fedora 44 or RHEL 10 differ. Everything also works on Ubuntu 26.04 LTS, with the differences noted where they matter (sudo-rs and the Rust core utilities).

Component Version in the examples
Distribution Ubuntu 24.04.5 LTS; Fedora 44 for dnf
Shell Bash 5.2
Package managers apt 2.8 (Ubuntu 24.04), apt 3.0 (Debian 13), DNF5 (Fedora 44), DNF 4 (RHEL 10)
Init system systemd 255 on Ubuntu 24.04
Kernel whatever your distribution ships; Linux 7.3 is the newest release (October 2026)

Terminal output in this guide comes from real runs, mostly in a fresh Ubuntu 24.04.5 image, with the user dev on a host called devbox. Output that needs systemd or the SSH server comes from a Debian 12 machine and is marked. Commands that change a whole system, such as rebooting or enabling a service, are shown with example output and say so.

What Changed Since Older Linux Tutorials

Many Linux tutorials on the web were written for releases that are long out of support. These are the changes that trip people up most:

Old way Current way
apt-key add for third-party repositories A keyring file and Signed-By in a deb822 .sources file; apt-key is gone in Debian 13 and Ubuntu 25.04 and later (Part 5)
ifconfig, netstat, route ip addr, ss, ip route (Part 8)
iptables rules nftables (nft), or ufw and firewalld on top of it
/var/log/syslog everywhere journalctl; Debian 12 and later no longer install rsyslog by default (Part 10)
cgroup v1 paths and MemoryLimit= cgroup v2 and MemoryMax= (Part 7)
cron for every scheduled job systemd timers, with cron still available
/bin and /usr/bin as separate directories merged /usr: /bin is a link to /usr/bin (Part 4)
yum dnf, with DNF5 on Fedora 41 and later
pip install into the system Python virtual environments or pipx; system Python is "externally managed"
Classic sudo sudo-rs on Ubuntu 25.10 and 26.04 LTS, same commands
netplan gateway4: and RHEL ifcfg files netplan routes:, and NetworkManager keyfiles on RHEL 10

Who This Guide Is For

  • Developers who want to understand the systems their code runs on.
  • People moving into DevOps, SRE, cloud or platform engineering.
  • Administrators coming from Windows who need to manage Linux servers.
  • Students and anyone curious about Linux.

You need no Linux experience. You need a computer where you can install a virtual machine or WSL, or an account with a cloud provider (Part 2 covers all three), and the patience to type the commands yourself rather than only read them.

How to Practise

  • Type every command. Change the examples and see what breaks.
  • Use a VM or a cloud server you can throw away, and take snapshots before risky changes.
  • Read error messages to the end: most of them say exactly what is wrong.
  • When a command is new, run it with --help or read its manual page (man).

Practice Hands-On

Try commands in the Linux Terminal simulator right in your browser, with no setup, and test yourself with the Linux Command Line Quiz and the Linux Fundamentals flashcards.

Keep Learning

Last updated:

Found an issue?