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
- What Is Linux? The Kernel, Distributions and Their History: the kernel and the software around it, distribution families, support lifetimes, and how to choose.
- 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.
- Linux Command Line Basics: moving around, managing files, reading logs,
find,grep, pipes, redirection and exit codes. - Linux File System Hierarchy and File Permissions:
/etc,/var,/usrand/proc,chmodandchown, special bits, links, disk usage and mounting. - Package Management: apt, dnf, Snap and Flatpak: install and update software, add third-party repositories the current way, and avoid broken systems.
- User and Group Management:
useradd, groups,/etc/passwdand/etc/shadow,sudorules, SSH keys and service accounts. - Process Management:
ps,top, signals, priorities, load and memory, systemd services and cgroups. - Networking in Linux:
ip,ss, DNS,tcpdump, nftables, ufw and firewalld in a practice network you build yourself. - Bash Shell Scripting Basics: variables, quoting, conditions, loops, functions, error handling, ShellCheck, and a complete backup script.
- 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
--helpor 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
- Introduction to Bash, to go deeper into scripting
- Networking Fundamentals, for TCP/IP, DNS and routing in depth
- Introduction to Docker, the natural next step after this guide
- Exercise: Securing your Linux server
We earn commissions when you shop through the links below.
Bitrise
Managed runners for GitHub Actions
Bitrise Build Hub runs your GitHub Actions jobs on M4 Macs and AMD Linux machines. Change runs-on and keep your workflows, secrets and logs on GitHub.
Atomsized
AWS platform engineering and GitOps
Design and automation for reliable AWS and Kubernetes platforms, safer delivery workflows, and preview and UAT environments your engineers can understand and own.
DigitalOcean
Cloud infrastructure for developers
Simple, reliable cloud computing designed for developers
DevDojo
Developer community & tools
Join a community of developers sharing knowledge and tools
SMTPfast
Developer-first email API
Send transactional and marketing email through a clean REST API. Detailed logs, webhooks, and embeddable signup forms in one dashboard.
QuizAPI
Developer-first quiz platform
Build, generate, and embed quizzes with a powerful REST API. AI-powered question generation and live multiplayer.
Want to support DevOps Daily and reach thousands of developers?
Become a SponsorTags
Found an issue?