Linux Administration Study Guide
flowchart TD A[Hub] --> B[Key Concepts] A --> C[Core Principles] A --> D[Practical Applications] B --> E[Fundamental definitions] C --> F[Design patterns] D --> G[Real-world usage]Why This Guide Exists
Section titled “Why This Guide Exists”Linux powers the majority of the world’s servers, cloud infrastructure, embedded systems, and supercomputers. Whether you are managing a home server, deploying applications to the cloud, or administering enterprise infrastructure, Linux administration is an essential skill for any systems professional.
This hub page maps every resource on this site. The guides cover the core competencies of Linux administration: the command line, file systems, process management, networking, systemd, security, and package management. Each section provides both conceptual understanding and practical, hands-on commands that you can apply immediately. The goal is not to memorise every command, but to understand the system deeply enough that you can solve problems you have never encountered before.
Table of Contents
Section titled “Table of Contents”- Why Linux
- Linux Distributions
- CLI Fundamentals
- File Systems
- Process Management
- Networking
- systemd
- Security
- Package Management
- LVM and Disk Partitioning
- Cross-Site Resources
- FAQ
Why Linux
Section titled “Why Linux”Linux dominates the server market for several reasons:
- Open source — free to use, modify, and distribute
- Stability — Linux servers routinely run for years without rebooting
- Security — strong permissions model, rapid patching, and community vigilance
- Performance — efficient resource usage; runs on everything from Raspberry Pi to supercomputers
- Ecosystem — vast package repositories, community support, and enterprise distributions
- Cloud native — all major cloud providers default to Linux for virtual machines and containers
Who Should Learn Linux?
Section titled “Who Should Learn Linux?”- System administrators managing servers
- DevOps engineers building and deploying infrastructure
- Software developers deploying to Linux servers
- Security professionals conducting assessments
- Students pursuing careers in IT or computer science
- Anyone who wants to understand how computers actually work
Linux Distributions
Section titled “Linux Distributions”Linux distributions package the Linux kernel with system libraries, package managers, and default configurations. The major distributions fall into several families.
Debian-Based
Section titled “Debian-Based”- Debian — the foundation; known for stability and reliability
- Ubuntu — user-friendly; the most popular desktop and cloud distribution
- Linux Mint — Ubuntu-based with a focus on desktop usability
Red Hat-Based
Section titled “Red Hat-Based”- Red Hat Enterprise Linux (RHEL) — enterprise-grade; commercial support
- CentOS / AlmaLinux / Rocky Linux — free RHEL-compatible alternatives
- Fedora — cutting-edge; upstream for RHEL
Arch-Based
Section titled “Arch-Based”- Arch Linux — rolling release; minimal base; user assembles the system
- Manjaro — Arch-based with easier installation and configuration
Choosing a Distribution
Section titled “Choosing a Distribution”| Use Case | Recommended Distribution |
|---|---|
| Enterprise servers | RHEL, AlmaLinux, Rocky Linux |
| Cloud deployments | Ubuntu, Amazon Linux |
| Desktop use | Ubuntu, Fedora, Linux Mint |
| Learning Linux | Arch Linux, Gentoo |
| Home servers | Ubuntu Server, Debian |
| Security testing | Kali Linux, Parrot OS |
CLI Fundamentals
Section titled “CLI Fundamentals”The command line is the primary interface for Linux administration. Mastering the CLI is the single most important skill for a Linux administrator.
Navigation
Section titled “Navigation”pwd # Print working directoryls # List directory contentsls -la # List all files with detailscd /path/to/dir # Change directorycd ~ # Go to home directorycd - # Go to previous directorytree # Display directory treeFile Operations
Section titled “File Operations”cp source dest # Copy filescp -r source dest # Copy directories recursivelymv source dest # Move or rename filesrm file # Delete a filerm -rf directory # Delete a directory recursivelymkdir -p path/to/dir # Create directories recursivelytouch file # Create an empty file or update timestampln -s target link # Create a symbolic linkText Processing
Section titled “Text Processing”cat file # Display file contentsless file # View file with paginghead -n 20 file # First 20 linestail -n 20 file # Last 20 linestail -f file # Follow file changes in real timegrep "pattern" file # Search for pattern in filegrep -r "pattern" dir # Recursive searchsed 's/old/new/g' file # Stream editor substitutionawk '{print $1}' file # Process text by columnswc -l file # Count linessort file # Sort linesuniq file # Remove duplicate linescut -d: -f1 /etc/passwd # Extract fieldsPermissions
Section titled “Permissions”chmod 755 file # Set permissions (owner=rwx, group=rx, other=rx)chmod u+x file # Add execute permission for ownerchmod -R 644 dir # Recursive permission changechown user:group file # Change file ownershipchown -R user:group dir # Recursive ownership changePermission meanings:
| Number | Permission | Symbol |
|---|---|---|
| 4 | Read | r |
| 2 | Write | w |
| 1 | Execute | x |
| 0 | None | --- |
Piping and Redirection
Section titled “Piping and Redirection”command1 | command2 # Pipe output of command1 to command2command > file # Redirect stdout to file (overwrite)command >> file # Redirect stdout to file (append)command 2> file # Redirect stderr to filecommand &> file # Redirect both stdout and stderrcommand < file # Redirect file to stdincommand1 && command2 # Run command2 only if command1 succeedscommand1 || command2 # Run command2 only if command1 failsFile Systems
Section titled “File Systems”Understanding Linux file systems is essential for managing storage, permissions, and backups.
Directory Structure
Section titled “Directory Structure”/ — root directory├── bin/ — essential user binaries├── boot/ — boot loader files├── dev/ — device files├── etc/ — system configuration├── home/ — user home directories├── lib/ — shared libraries├── mnt/ — temporary mount points├── opt/ — optional software├── proc/ — process information (virtual)├── root/ — root user's home directory├── sbin/ — system binaries├── srv/ — service data├── sys/ — system information (virtual)├── tmp/ — temporary files├── usr/ — user programs and data│ ├── bin/ — user binaries│ ├── lib/ — libraries│ └── share/ — architecture-independent data└── var/ — variable data (logs, mail, spool) ├── log/ — system logs └── tmp/ — persistent temporary filesFile System Types
Section titled “File System Types”| Type | Description | Use Case |
|---|---|---|
| ext4 | Default Linux file system | General purpose |
| XFS | High-performance; large files | Databases, media |
| Btrfs | Copy-on-write; snapshots | Desktops, backup targets |
| ZFS | Advanced; RAID, compression, snapshots | Storage servers |
| tmpfs | RAM-based file system | /tmp, /run |
| proc | Virtual file system | Process and kernel info |
Mounting
Section titled “Mounting”mount /dev/sdb1 /mnt/data # Mount a partitionmount -t ext4 /dev/sdb1 /mnt # Specify file system typeumount /mnt/data # Unmountcat /proc/mounts # View mounted file systemsblkid # View block device UUIDs and typeslsblk # List block devices/etc/fstab
Section titled “/etc/fstab”The /etc/fstab file defines file systems mounted at boot:
UUID=xxx /mnt/data ext4 defaults 0 2Fields: device, mount point, type, options, dump, fsck order.
Process Management
Section titled “Process Management”Linux is a multitasking operating system. Understanding process management is essential for diagnosing performance issues and maintaining system stability.
Viewing Processes
Section titled “Viewing Processes”ps aux # List all running processesps -ef # Full-format listingtop # Interactive process viewerhtop # Improved top (if installed)pstree # Display process treepgrep nginx # Find process by namepidof nginx # Get PID by nameProcess Control
Section titled “Process Control”kill PID # Send SIGTERM (graceful stop)kill -9 PID # Send SIGKILL (force stop)killall nginx # Kill all processes named nginxpkill -f "pattern" # Kill processes matching patternnice -n 10 command # Run command with lower priorityrenice -n 5 -p PID # Change priority of running processnohup command & # Run command immune to hangupsbg # Background a stopped processfg # Foreground a background processjobs # List background jobsProcess States
Section titled “Process States”| State | Description |
|---|---|
| R | Running or runnable |
| S | Sleeping (interruptible) |
| D | Uninterruptible sleep (usually I/O) |
| Z | Zombie (terminated but not reaped) |
| T | Stopped (by signal) |
Resource Monitoring
Section titled “Resource Monitoring”free -h # Memory usagevmstat 1 5 # Virtual memory statistics (1-second intervals, 5 reports)iostat 1 5 # I/O statisticssar -u 1 5 # CPU usage over timedstat # Versatile resource statisticsnmon # Interactive performance monitorNetworking
Section titled “Networking”Linux networking is powerful and flexible. Most network configuration and troubleshooting happens at the command line.
Network Configuration
Section titled “Network Configuration”ip addr show # Show IP addressesip link show # Show network interfacesip route show # Show routing tableip neigh show # Show ARP tableifconfig # Legacy interface configuration (deprecated)hostname # Show/set hostnamehostname -I # Show IP addresses onlyConnectivity Testing
Section titled “Connectivity Testing”ping google.com # Test connectivitytraceroute google.com # Trace route to destinationmtr google.com # Combined ping and traceroutenslookup domain.com # DNS lookupdig domain.com # Detailed DNS lookuphost domain.com # Simple DNS lookupcurl -I https://example.com # HTTP headerswget https://example.com/file # Download a fileNetwork Utilities
Section titled “Network Utilities”ss -tlnp # Show listening TCP portsss -ulnp # Show listening UDP portsnetstat -tlnp # Legacy version of sslsof -i :80 # Show processes using port 80tcpdump -i eth0 # Capture network trafficnmap -sT target # Port scanscp file user@host:/path # Secure copy over SSHrsync -avz source dest # Synchronise filesssh user@host # Connect to remote hostssh -p 2222 user@host # Connect on non-standard portssh-keygen -t ed25519 # Generate SSH key pairssh-copy-id user@host # Copy public key to remote hostssh -L 8080:localhost:80 user@host # Local port forwardingssh -R 8080:localhost:80 user@host # Remote port forwardingFirewall
Section titled “Firewall”# iptables (legacy)iptables -L -n # List rulesiptables -A INPUT -p tcp --dport 22 -j ACCEPT # Allow SSH
# nftables (modern)nft list ruleset # List all rules
# ufw (Ubuntu)ufw status # Check firewall statusufw allow ssh # Allow SSHufw enable # Enable firewall
# firewalld (RHEL/Fedora)firewall-cmd --list-all # List all rulesfirewall-cmd --add-service=ssh --permanent # Allow SSHsystemd
Section titled “systemd”systemd is the init system and service manager for most modern Linux distributions. It manages services, mounts, timers, and system state.
Service Management
Section titled “Service Management”systemctl status nginx # Check service statussystemctl start nginx # Start a servicesystemctl stop nginx # Stop a servicesystemctl restart nginx # Restart a servicesystemctl reload nginx # Reload configurationsystemctl enable nginx # Start at bootsystemctl disable nginx # Do not start at bootsystemctl is-active nginx # Check if runningsystemctl is-enabled nginx # Check if enabled at bootsystemctl list-units --type=service # List all servicesJournal and Logs
Section titled “Journal and Logs”journalctl -u nginx # Logs for a specific servicejournalctl -f # Follow all logsjournalctl --since "1 hour ago" # Logs from the last hourjournalctl -p err # Error-level messages and abovejournalctl --disk-usage # Check journal sizejournalctl --vacuum-size=500M # Limit journal to 500 MBTimers (Cron Replacement)
Section titled “Timers (Cron Replacement)”systemd timers replace cron for scheduling tasks:
[Unit]Description=Daily backup timer
[Timer]OnCalendar=dailyPersistent=true
[Install]WantedBy=timers.targetsystemctl list-timers # List all timerssystemctl start backup.timer # Start a timersystemctl enable backup.timer # Enable at bootSystem State
Section titled “System State”systemctl reboot # Reboot the systemsystemctl poweroff # Shut down the systemsystemctl suspend # Suspend to RAMsystemctl hibernate # Hibernate to disksystemctl isolate multi-user.target # Switch to multi-user modeSecurity
Section titled “Security”Linux security is built on a permissions model, but securing a Linux system requires attention to many areas.
User Management
Section titled “User Management”useradd -m -s /bin/bash username # Create a userpasswd username # Set passwordusermod -aG sudo username # Add to sudo group (Ubuntu)usermod -aG wheel username # Add to wheel group (RHEL)userdel -r username # Delete user and home directoryid username # Show user groupswho # Show logged-in userslast # Show login historySSH Hardening
Section titled “SSH Hardening”- Use key-based authentication; disable password authentication
- Change the default SSH port
- Restrict SSH access to specific users or groups
- Use AllowUsers or AllowGroups in
/etc/ssh/sshd_config - Enable fail2ban to block brute-force attempts
File Permissions and Security
Section titled “File Permissions and Security”chmod 600 sensitive-file # Owner read/write onlychmod 700 ~/.ssh # Restrict SSH directorychattr +i immutable-file # Make file immutablelsattr file # View file attributesfind / -perm -4000 # Find SUID binariesfind / -writable -type f # Find world-writable filesAppArmor and SELinux
Section titled “AppArmor and SELinux”- AppArmor — path-based mandatory access control (Ubuntu, SUSE)
- SELinux — label-based mandatory access control (RHEL, Fedora)
Both restrict what processes can do, even as root. Learning to work with them (rather than disabling them) is essential for secure Linux administration.
Auditing and Monitoring
Section titled “Auditing and Monitoring”ausearch -m LOGIN # Search audit logsaureport # Generate audit reportslogwatch # Summarise log filesrkhunter # Rootkit detectionclamscan # Antivirus scanningPackage Management
Section titled “Package Management”Package managers handle installing, updating, and removing software. Each distribution family has its own package manager.
APT (Debian/Ubuntu)
Section titled “APT (Debian/Ubuntu)”apt update # Update package listsapt upgrade # Upgrade installed packagesapt install package # Install a packageapt remove package # Remove a packageapt purge package # Remove with configurationapt search keyword # Search for packagesapt show package # Show package detailsapt autoremove # Remove unused dependenciesdpkg -i package.deb # Install a .deb filedpkg -l # List installed packagesDNF/YUM (RHEL/Fedora)
Section titled “DNF/YUM (RHEL/Fedora)”dnf update # Update packagesdnf install package # Install a packagednf remove package # Remove a packagednf search keyword # Search for packagesdnf info package # Show package detailsdnf list installed # List installed packagesrpm -ivh package.rpm # Install an .rpm filePacman (Arch)
Section titled “Pacman (Arch)”pacman -Syu # Full system upgradepacman -S package # Install a packagepacman -R package # Remove a packagepacman -Rns package # Remove with config and dependenciespacman -Ss keyword # Search for packagespacman -Qi package # Show package detailspacman -Qs # List installed packagesSnap and Flatpak
Section titled “Snap and Flatpak”Universal package managers that work across distributions:
snap install package # Install a snapsnap list # List installed snapsflatpak install package # Install a Flatpakflatpak list # List installed FlatpaksLVM and Disk Partitioning
Section titled “LVM and Disk Partitioning”LVM (Logical Volume Manager) provides flexible disk management, allowing you to resize volumes, add disks, and create snapshots.
LVM Concepts
Section titled “LVM Concepts”- Physical Volume (PV) — a disk or partition initialised for LVM
- Volume Group (VG) — a pool of storage from one or more physical volumes
- Logical Volume (LV) — a virtual partition carved from a volume group
LVM Operations
Section titled “LVM Operations”pvcreate /dev/sdb # Initialise a disk for LVMpvdisplay # Show physical volumesvgcreate myvg /dev/sdb # Create a volume groupvgdisplay # Show volume groupslvcreate -L 10G -n mylv myvg # Create a 10 GB logical volumelvcreate -l 100%FREE -n mylv myvg # Use all free spacelvdisplay # Show logical volumesmkfs.ext4 /dev/myvg/mylv # Format the logical volumemount /dev/myvg/mylv /mnt # Mount the logical volumeLVM Resizing
Section titled “LVM Resizing”lvextend -L +5G /dev/myvg/mylv # Add 5 GB to a logical volumeresize2fs /dev/myvg/mylv # Resize ext4 file systemxfs_growfs /mnt # Resize XFS file systemDisk Partitioning
Section titled “Disk Partitioning”fdisk /dev/sdb # Partition with fdisk (MBR)gdisk /dev/sdb # Partition with gdisk (GPT)parted /dev/sdb # Partition with partedlsblk # View partition layoutpartprobe # Inform kernel of partition changesRAID with mdadm
Section titled “RAID with mdadm”mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1mdadm --detail /dev/md0 # Check RAID statuscat /proc/mdstat # View RAID statusCross-Site Resources
Section titled “Cross-Site Resources”Linux administration connects to many other areas:
- TrueNAS Administration — TrueNAS SCALE runs on Linux; ZFS and Linux administration overlap
- Networking — network configuration and troubleshooting
- Security — security hardening and vulnerability assessment
- Performance Tuning — system-level optimisation
- Docker and Kubernetes — containerisation on Linux
- Developer Tools — development environments on Linux
Frequently Asked Questions
Section titled “Frequently Asked Questions”Which Linux distribution should I learn?
Section titled “Which Linux distribution should I learn?”For server administration, learn Ubuntu or RHEL/AlmaLinux. Ubuntu is the most popular cloud distribution and has the largest community. RHEL dominates enterprise environments. For learning Linux deeply, Arch Linux forces you to understand every component. For desktop use, Ubuntu or Fedora are excellent choices.
How do I become proficient in the command line?
Section titled “How do I become proficient in the command line?”Practice daily. Replace GUI tasks with command-line equivalents. Work through tutorials. Set up a home server and administer it entirely via SSH. The command line becomes intuitive through repetition — there is no shortcut.
What is the difference between init systems?
Section titled “What is the difference between init systems?”SysVinit is the traditional init system. Upstart replaced it in some distributions. systemd is the current standard, used by most major distributions. systemd provides faster boot times, better service management, and integrated logging. Learning systemd is essential for modern Linux administration.
How do I recover from a broken system?
Section titled “How do I recover from a broken system?”Boot from a live USB or rescue mode. Mount your root filesystem. Use chroot to enter the installed system. Repair configuration files, reinstall bootloaders, or restore from backups. Having a rescue plan and regular backups is essential for any production system.
Do I need to learn Linux for a development career?
Section titled “Do I need to learn Linux for a development career?”If you deploy to cloud servers (AWS, GCP, Azure), almost certainly yes. Most cloud instances run Linux. Even if you develop on macOS or Windows, your deployment target is likely Linux. Basic Linux skills — SSH, file management, process control — are expected of most backend and DevOps engineers.
How do I keep a Linux system secure?
Section titled “How do I keep a Linux system secure?”Keep it updated. Minimise installed packages. Use firewall rules. Enable SELinux or AppArmor. Use SSH keys. Monitor logs. Run services with least privilege. Regularly audit for vulnerabilities. Security is not a one-time setup — it requires ongoing attention.
Last updated: 24 July 2026
Written by Wyatt. For questions or feedback, visit wyattau.com.