Learning Linux from scratch might seem intimidating, but with the right roadmap, anyone can go from complete beginner to confident Linux user in 3-6 months. Linux powers 96% of the world's top servers, dominates cloud computing, and is the foundation of DevOps, cybersecurity, and systems administration careers.
This guide provides a structured, step-by-step learning path that takes you from "What is Linux?" to confidently managing servers and writing automation scripts.
Phase 1: Understanding Linux Basics (Week 1-2)
What is Linux?
Linux is an open-source operating system kernel created by Linus Torvalds in 1991. Unlike Windows or macOS, Linux is freely available, highly customizable, and powers everything from smartphones (Android) to supercomputers. A Linux distribution (distro) packages the Linux kernel with software, desktop environments, and package managers into a complete operating system.
Choosing Your First Distro
Your first distribution should be beginner-friendly with great documentation and community support:
| Distro | Best For | Package Manager |
|---|---|---|
| Ubuntu | Absolute beginners, desktop use | apt |
| Linux Mint | Windows switchers | apt |
| Fedora | Developers, RHEL path | dnf |
| AlmaLinux | Enterprise/server learning | dnf |
Setting Up Your Learning Environment
# Option 1: Virtual Machine (safest for beginners)
# Download VirtualBox from virtualbox.org
# Download Ubuntu ISO from ubuntu.com
# Create VM: 2 CPU, 4GB RAM, 25GB disk
# Option 2: WSL on Windows 10/11
wsl --install -d Ubuntu
# Option 3: Cloud Server (recommended for server skills)
# Get a $5/month VPS from DigitalOcean, Linode, or Hetzner
ssh root@your-server-ip
Phase 2: Mastering the Terminal (Week 2-4)
The terminal (command line) is where Linux power lives. Start with these essential commands and practice daily:
Navigation and File Operations
# Where am I?
pwd
# List files (long format, all files)
ls -la
# Change directory
cd /var/log
cd .. # Up one level
cd ~ # Home directory
# Create files and directories
touch myfile.txt
mkdir -p projects/web/src
# Copy, move, delete
cp file.txt backup.txt
mv old.txt new.txt
rm unwanted.txt
rm -r old-directory/
# View file contents
cat /etc/hostname
less /var/log/syslog # Scroll through large files
head -20 file.txt # First 20 lines
tail -f /var/log/syslog # Follow live logs
Getting Help
# Manual pages (most important skill!)
man ls
man chmod
man grep
# Quick help
ls --help
command --help
# Search for commands
apropos "disk usage"
whatis chmod
Practice Exercise: File Scavenger Hunt
# Try these exercises:
# 1. Find your hostname
cat /etc/hostname
# 2. Count how many users are on the system
wc -l /etc/passwd
# 3. Find all .conf files in /etc
find /etc -name "*.conf" -type f 2>/dev/null | wc -l
# 4. Check disk usage
df -h
# 5. See running processes
ps aux | head -20
Phase 3: Users, Permissions and Security (Week 4-6)
Understanding Linux permissions is crucial. Every file has an owner, a group, and permission bits controlling who can read, write, or execute it.
# User management
sudo useradd -m -s /bin/bash john
sudo passwd john
sudo usermod -aG sudo john
id john
groups john
# File permissions (read=4, write=2, execute=1)
ls -la myfile.txt # View permissions
chmod 755 script.sh # rwxr-xr-x
chmod 644 config.txt # rw-r--r--
chown john:john file.txt
# Sudo and root
sudo apt update # Run as root
sudo -i # Switch to root shell (careful!)
# SSH basics
ssh user@server # Connect to remote server
ssh-keygen -t ed25519 # Generate SSH key pair
ssh-copy-id user@server # Copy key to server
Phase 4: Package Management and Software (Week 6-8)
# Debian/Ubuntu (apt)
sudo apt update # Refresh package list
sudo apt upgrade # Upgrade installed packages
sudo apt install nginx vim git # Install packages
sudo apt remove nginx # Remove package
apt search "web server" # Search packages
# Fedora/RHEL (dnf)
sudo dnf check-update
sudo dnf install nginx
sudo dnf remove nginx
# Check installed software
dpkg -l | grep nginx
which python3
python3 --version
# Manage services
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl status nginx
sudo systemctl restart nginx
Phase 5: Networking Fundamentals (Week 8-10)
# Network configuration
ip addr show # IP addresses
ip route show # Routing table
hostname -I # Quick IP
# Connectivity testing
ping -c 4 google.com # Test connection
traceroute google.com # Trace route
dig example.com # DNS lookup
curl -I https://google.com # HTTP headers
# Ports and connections
ss -tuln # Listening ports
ss -tunap # All connections with processes
# Basic firewall with UFW
sudo ufw status
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
Phase 6: Shell Scripting (Week 10-14)
#!/bin/bash
# my-first-script.sh - A beginner bash script
# Variables
NAME="Linux Learner"
DATE=$(date +"%Y-%m-%d")
echo "Hello $NAME! Today is $DATE"
# Conditionals
if [ -f /etc/nginx/nginx.conf ]; then
echo "Nginx is installed"
else
echo "Nginx is not installed"
fi
# Loops
for server in web01 web02 db01; do
echo "Checking $server..."
ping -c 1 $server 2>/dev/null && echo " UP" || echo " DOWN"
done
# Functions
check_disk() {
local threshold=$1
local usage
usage=$(df / | awk 'NR==2 {print $5}' | tr -d '%')
if [ "$usage" -gt "$threshold" ]; then
echo "WARNING: Disk usage is $usage%"
fi
}
check_disk 80
# Make executable and run
# chmod +x my-first-script.sh
# ./my-first-script.sh
Phase 7: Server Administration (Week 14-20)
# Web server setup
sudo apt install nginx
sudo systemctl enable nginx
echo "<h1>My First Server</h1>" | sudo tee /var/www/html/index.html
# Database setup
sudo apt install postgresql
sudo -u postgres createuser myapp
sudo -u postgres createdb myappdb
# System monitoring
top # CPU and memory (interactive)
htop # Better version of top
free -h # Memory usage
df -h # Disk usage
journalctl -f # System logs (live)
# Cron jobs (task automation)
crontab -e
# Add: 0 2 * * * /opt/backup.sh (daily backup at 2 AM)
# Log analysis
grep "error" /var/log/syslog | tail -20
journalctl -u nginx --since "1 hour ago"
Phase 8: Certification Path (Week 20+)
Once you have practical skills, certifications validate your knowledge for employers:
- CompTIA Linux+ (XK0-005) - Entry-level, vendor-neutral Linux certification
- LPIC-1 - Linux Professional Institute Level 1
- RHCSA (EX200) - Red Hat Certified System Administrator, hands-on exam, highly valued by employers
- LFCS - Linux Foundation Certified System Administrator
Daily Practice Routine for Success
- 30-60 minutes daily on the terminal - consistency beats intensity
- Set up a home lab with VirtualBox or a cheap VPS ($5/month)
- Break things on purpose, then fix them - this is how real learning happens
- Read man pages for commands you use regularly
- Automate repetitive tasks with bash scripts
- Follow Linux communities: r/linux, r/linuxadmin, nixCraft
- Document what you learn in a personal wiki or notes
Common Mistakes to Avoid
- Distro hopping - Pick one distro and stick with it for at least 3 months
- Copying commands blindly - Always understand what a command does before running it
- Running everything as root - Use sudo only when necessary
- Skipping man pages - They are your best reference
- Avoiding the terminal - GUI tools are fine, but the terminal is where real power lives
Recommended Books for Your Linux Journey
Accelerate your learning with structured, comprehensive guides:
Download our Linux Learning Roadmap Cheat Sheet for a printable quick-reference of this entire learning path.