Linux System Administration Tutorial
Learn Linux System Administration step by step: 37 lessons in 9 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Getting Started
- What a Linux System Administrator Does Learn what Linux system administration covers: users, packages, services, storage, networking, security and monitoring, plus the habits that keep servers healthy.
- Choosing a Linux Distribution for Servers Compare Debian, Ubuntu, RHEL-compatible and other Linux server distributions: package formats, release cycles, support lengths and how to decide for your project.
- Installing a Linux Server Step by Step Plan and perform a Linux server installation: choose installation media, verify checksums, partition, set hostname and users, enable SSH and finish with a post-install checklist.
- First Login and Shell Basics for Administrators Log in to a Linux server over SSH, learn what the prompt tells you, use history, tab completion, pipes and man pages, and adopt shell habits that prevent costly mistakes.
- The Linux Filesystem Hierarchy for Administrators Learn where things live on a Linux server: /etc for configuration, /var for changing data, /usr for programs, /proc and /sys for the kernel, and why it matters for backups.
Users, Groups and Permissions
- Linux Users and the passwd, shadow and group Files Understand how Linux stores accounts: UIDs, GIDs, /etc/passwd, /etc/shadow, /etc/group, system versus regular users and the special root account.
- Managing Users and Groups: useradd, usermod, passwd Create, modify, lock and delete Linux users and groups with useradd, usermod, userdel, groupadd, passwd and chage, and set password aging policy with confidence.
- File Permissions, Ownership and umask Read and change Linux permissions: rwx bits, octal modes, chmod, chown, umask defaults and the special setuid, setgid and sticky bits for shared directories.
- sudo and Privilege Management on Linux Grant administrative power safely with sudo: groups, visudo, drop-in files in /etc/sudoers.d, command limits, NOPASSWD risks and reading the sudo log.
Packages and Services
- Package Managers: apt, dnf and rpm Explained Install, update, query and remove software with apt and dpkg on Debian systems and dnf and rpm on Red Hat systems, including dependency handling and package queries.
- Repositories, Signing Keys and Patch Management Configure package repositories safely, understand GPG signing keys, enable automatic security updates and plan patching, reboots and rollbacks on Linux servers.
- Managing Services with systemd and systemctl Control Linux services with systemctl: start, stop, enable, mask, check status, read logs with journalctl, understand targets and find failed units after boot.
- Writing systemd Unit Files, Drop-ins and Timers Create your own systemd service, override packaged units with drop-ins, add restart policies and sandboxing options, and schedule jobs with timers instead of cron.
Storage and Filesystems
- Disks, Partitions and lsblk: MBR, GPT and Device Names Identify block devices with lsblk and blkid, understand MBR and GPT partition tables, create partitions with fdisk or parted and avoid destroying the wrong disk.
- Filesystems, mkfs, mount and /etc/fstab Create ext4, XFS and Btrfs filesystems with mkfs, mount them by UUID, make mounts permanent in /etc/fstab, check and repair with fsck and grow them safely.
- LVM: Physical Volumes, Volume Groups and Logical Volumes Use Logical Volume Manager to pool disks, create resizable logical volumes, extend filesystems online, take snapshots and add or replace disks without downtime.
- Software RAID with mdadm and Disk Health Monitoring Understand RAID 0, 1, 5, 6 and 10, build and monitor mdadm arrays, replace failed disks and check drive health with SMART tools before data is lost.
- Disk Usage, Quotas and Backups with rsync and tar Find what fills a disk with df, du and ncdu, limit users with quotas, and build reliable backups with tar, rsync and snapshots following the 3-2-1 rule and restore tests.
Networking and Firewalls
- Network Interfaces, Addresses and Routes Inspect and configure Linux networking with the ip command: interfaces, IPv4 and IPv6 addresses, CIDR, the routing table, and persistent setups with NetworkManager or netplan.
- DNS and Name Resolution on Linux Understand how Linux turns names into addresses: nsswitch, /etc/hosts, systemd-resolved, resolv.conf, and how to debug problems with dig, getent and resolvectl.
- Firewalls with nftables, ufw and firewalld Learn how the Linux packet filter works and how to manage it with nftables, ufw and firewalld: default-deny policy, stateful rules, NAT, and safe remote changes.
- Remote Access with SSH: Keys, Config and Tunnels Set up and use SSH like an administrator: key pairs, authorized_keys, the client config file, jump hosts, port forwarding, scp and rsync, and the sshd_config basics.
Security Hardening
- Reducing the Attack Surface of a Linux Server Start Linux hardening the practical way: find what listens on the network, remove unneeded services and packages, apply least privilege, patch quickly and tune kernel settings with sysctl.
- SSH Hardening and fail2ban Lock down SSH on Linux: disable passwords and root login, restrict users, use modern algorithms and MFA, rate-limit with the firewall, and ban brute-force sources with fail2ban.
- Mandatory Access Control: SELinux and AppArmor Learn how SELinux and AppArmor confine Linux processes beyond file permissions: modes, contexts, booleans, profiles, reading denials, and fixing problems without turning protection off.
- Auditing and File Integrity: auditd, AIDE and Lynis Detect and prove changes on Linux: write auditd rules, search audit logs with ausearch, check file integrity with AIDE and checksums, and score your hardening with Lynis and CIS benchmarks.
Monitoring and Logs
- System Logs with journald and rsyslog Read and manage Linux logs: journalctl filters and flags, persistent journals, syslog facilities and priorities, /var/log files, rsyslog rules, and forwarding logs to a central server.
- Log Rotation and Retention with logrotate Keep logs from filling the disk: how logrotate works, writing config files, rotate and compress options, postrotate scripts, copytruncate, testing with -d and retention planning.
- Performance Monitoring: CPU, Memory, Disk and Load Find bottlenecks on a Linux server with top, vmstat, free, iostat and ss: read load average, memory and swap correctly, spot I/O wait, and apply the USE method step by step.
- Metrics, Dashboards and Alerting for Linux Servers Move from looking at servers to watching them: metric types, node_exporter and Prometheus, useful alert rules, thresholds that avoid noise, uptime checks, and what to do when an alert fires.
Automation and Troubleshooting
- Scheduling with cron and systemd Timers Schedule recurring jobs on Linux: cron expression syntax, crontab and /etc/cron.d, the cron environment pitfalls, anacron, systemd timer units, and logging and locking for reliable jobs.
- Shell Scripts for Administrators: Safe Automation Write administration scripts that fail safely: strict mode, quoting, functions, arguments, traps and cleanup, locking, logging, dry-run flags, idempotent steps and ShellCheck.
- Configuration Management and Idempotence with Ansible Manage many Linux servers consistently with Ansible: inventory, ad-hoc commands, playbooks, modules, handlers, variables, templates, check mode and why idempotence is the core idea.
- A Linux Troubleshooting Playbook Diagnose Linux problems methodically: gather facts, form a hypothesis, test one change at a time, and use checklists for boot failures, full disks, OOM kills, failed services and network outages.
Projects and Practice
- Project: Harden a New Server from Scratch A guided project: take a fresh Linux VPS to a safe baseline with a sudo user, SSH keys, firewall, fail2ban, automatic updates, time sync, logging and a verification checklist.
- Project: Build a Server Health Report Build a daily health report for a Linux server: collect disk, memory, load, failed units, logins and update status, score the results, and deliver it by timer with exit codes.
- Practice: Linux Administration Scenarios with Solutions Test yourself with realistic Linux administration scenarios on networking, firewalls, SSH, SELinux, logs, monitoring, cron and troubleshooting, with hints, solutions and self-check quizzes.