Linux powers 96% of the world's top web servers, every Android phone, and nearly all supercomputers. Whether you're a developer, sysadmin, data scientist, or just curious — knowing Linux is a superpower. This tutorial takes you from zero to confident Linux user, step by step.
What you'll learn
| Topic | What you'll be able to do |
|---|---|
| Setup | Install Linux or use it without installing |
| Navigation | Move around the file system with confidence |
| Files & Directories | Create, copy, move, delete, find files |
| Permissions | Understand and set file permissions |
| Text processing | Read and manipulate text files |
| Processes | View and control running programs |
| Networking | Check connections, transfer files, SSH |
| Package management | Install software with apt, dnf, pacman |
| Shell scripting | Automate tasks with Bash scripts |
Why learn Linux?
| Reason | Details |
|---|---|
| Servers run Linux | AWS, Google Cloud, Azure VMs are Linux by default |
| Developer tooling | Docker, Kubernetes, Git — all built for Linux |
| Career demand | DevOps, cloud, security roles require Linux |
| Free and open source | No license cost, modify the source code |
| Performance | Lightweight, fast, no background bloat |
| Security | Fewer viruses, granular permission control |
| WSL on Windows | Run Linux inside Windows 11 without dual-boot |
How to get Linux
You don't need to wipe your computer to try Linux.
Option 1 — WSL2 (Windows users, recommended for learning)
# In PowerShell as Administrator
wsl --install
# Installs Ubuntu by default, restart required
Option 2 — Virtual machine
Download VirtualBox (free) and install an Ubuntu ISO. Safe, isolated, no risk to your existing OS.
Option 3 — Live USB
Download Ubuntu ISO → flash to USB with Rufus or Balena Etcher → boot from USB. Try Linux without installing.
Option 4 — Cloud instance
Spin up a free-tier AWS EC2, Google Cloud, or Oracle Cloud instance. SSH in from your existing OS.
Option 5 — Install natively (dual-boot or replace)
Best performance, real experience. Ubuntu is the friendliest distribution for beginners.
Linux distributions compared
| Distribution | Base | Best for |
|---|---|---|
| Ubuntu | Debian | Beginners, desktops, servers |
| Debian | — | Stability, servers |
| Fedora | Red Hat | Developers, cutting-edge software |
| CentOS Stream / Rocky | Red Hat | Enterprise servers |
| Arch Linux | — | Advanced users, customization |
| Kali Linux | Debian | Cybersecurity, penetration testing |
| Raspberry Pi OS | Debian | Raspberry Pi, embedded |
| Alpine | — | Docker containers, minimal footprint |
Start with Ubuntu. Largest community, most tutorials, easiest hardware support.
The Terminal
The terminal (also called shell, command line, or console) is where you type commands. On Linux:
- Open with Ctrl+Alt+T (most desktops)
- Or find "Terminal" in your applications menu
- On a server: you're already in the terminal via SSH
The shell interprets your commands. The default shell on Ubuntu is Bash.
username@hostname:~$
| Part | Meaning |
|---|---|
username |
Your user account name |
hostname |
Machine name |
~ |
Current directory (~ means home directory) |
$ |
Normal user prompt (root uses #) |
Phase 1 — Navigating the File System
The Linux file system structure
Linux uses a single tree starting at / (root). There are no drive letters like C:\.
/
├── bin/ Essential commands (ls, cp, mv)
├── etc/ System configuration files
├── home/ User home directories (/home/alice, /home/bob)
├── var/ Variable data (logs, databases)
├── tmp/ Temporary files (cleared on reboot)
├── usr/ User programs (/usr/bin, /usr/lib)
├── opt/ Optional third-party software
├── dev/ Device files (disk, USB, etc.)
├── proc/ Running process info (virtual filesystem)
├── sys/ Kernel and hardware info (virtual filesystem)
└── root/ Home directory for the root user
Essential navigation commands
# Print Working Directory — where am I?
pwd
# /home/alice
# List files
ls
ls -l # long format (permissions, size, date)
ls -la # include hidden files (start with .)
ls -lh # human-readable sizes (KB, MB)
ls /etc # list a specific directory
# Change Directory
cd /etc # go to /etc
cd ~ # go to home directory
cd .. # go up one level
cd - # go back to previous directory
cd Documents # relative path (from current dir)
# Clear terminal screen
clear # or Ctrl+L
Absolute vs relative paths
# Absolute path — starts from / (always works from anywhere)
cd /home/alice/Documents
# Relative path — from your current location
cd Documents # only works if you're in /home/alice
cd ./Documents # same, ./ means "here"
cd ../alice # up one level, then into alice
Phase 2 — Working with Files and Directories
Creating files and directories
# Create an empty file
touch hello.txt
# Create a file with content
echo "Hello, Linux!" > hello.txt
# Append to a file (>> appends, > overwrites)
echo "Second line" >> hello.txt
# Create a directory
mkdir projects
mkdir -p projects/web/frontend # create nested dirs at once
# Create a file using a text editor
nano hello.txt # beginner-friendly editor
vim hello.txt # advanced editor (press i to insert, Esc then :wq to save)
Reading files
# Print entire file
cat hello.txt
# Read page by page (press space to advance, q to quit)
less hello.txt
# First 10 lines
head hello.txt
head -n 20 hello.txt # first 20 lines
# Last 10 lines
tail hello.txt
tail -n 20 hello.txt # last 20 lines
tail -f /var/log/syslog # follow file in real time (useful for logs)
Copying, moving, deleting
# Copy file
cp hello.txt hello-backup.txt
cp hello.txt /tmp/ # copy to /tmp directory
cp -r projects/ projects-backup/ # copy directory recursively
# Move / rename
mv hello.txt goodbye.txt # rename
mv goodbye.txt /tmp/ # move to /tmp
mv projects/ /opt/projects/ # move directory
# Delete
rm hello.txt # delete file
rm -i hello.txt # ask for confirmation
rm -r projects/ # delete directory recursively
rm -rf projects/ # force delete, no confirmation (DANGEROUS)
# Delete empty directory
rmdir empty-dir/
Warning: Linux has no Recycle Bin for
rm. Deleted files are gone. Use-iwhen unsure.
Finding files
# Find files by name
find /home -name "hello.txt"
find . -name "*.log" # all .log files in current dir
# Find by type
find /etc -type f -name "*.conf" # files
find /home -type d # directories only
# Find by size
find /var/log -size +10M # files larger than 10 MB
# Find by modification time
find . -mtime -7 # modified in last 7 days
# Locate (faster, uses a database — update with: sudo updatedb)
locate hello.txt
Wildcards (glob patterns)
ls *.txt # all .txt files
ls file?.txt # file1.txt, file2.txt (? = one char)
ls file[123].txt # file1.txt, file2.txt, file3.txt
ls {*.txt,*.md} # all .txt and .md files
Phase 3 — File Permissions
Every file in Linux has permissions for three groups: owner, group, and others.
Reading permissions
ls -l hello.txt
# -rw-r--r-- 1 alice users 42 Jul 16 10:00 hello.txt
| Field | Meaning |
|---|---|
- |
File type (-=file, d=directory, l=symlink) |
rw- |
Owner permissions: read+write, no execute |
r-- |
Group permissions: read only |
r-- |
Others permissions: read only |
alice |
File owner |
users |
File group |
Permission bits
| Symbol | Octal | Meaning |
|---|---|---|
r |
4 | Read |
w |
2 | Write |
x |
1 | Execute |
- |
0 | No permission |
chmod — change permissions
# Symbolic mode
chmod u+x script.sh # add execute for owner (u=user/owner)
chmod g-w file.txt # remove write from group
chmod o+r file.txt # add read for others
chmod a+x script.sh # add execute for all (a=all)
chmod u=rw,g=r,o= file.txt # set exact permissions
# Octal mode (most common)
chmod 755 script.sh # rwxr-xr-x (owner: all, group+others: read+exec)
chmod 644 file.txt # rw-r--r-- (owner: read+write, group+others: read)
chmod 600 private.key # rw------- (owner only)
chmod 777 folder/ # rwxrwxrwx (everyone: all — avoid this)
# Recursive (apply to directory and contents)
chmod -R 755 myproject/
Common permission patterns
| Permission | Octal | Use case |
|---|---|---|
rwxr-xr-x |
755 | Scripts, executables, directories |
rw-r--r-- |
644 | Regular files, web content |
rw------- |
600 | Private keys, sensitive config |
rwx------ |
700 | Private directories |
rw-rw-r-- |
664 | Shared group files |
chown — change ownership
chown alice file.txt # change owner to alice
chown alice:users file.txt # change owner and group
chown -R alice:users myproject/ # recursive
sudo chown root:root /etc/hosts # system files need sudo
sudo — run as root
sudo apt update # run as superuser
sudo nano /etc/hosts # edit system file
sudo -i # switch to root shell (careful!)
whoami # print current user
Phase 4 — Text Processing
Linux has powerful tools for working with text files.
grep — search text
# Search for a pattern in a file
grep "error" /var/log/syslog
grep -i "error" file.txt # case-insensitive
grep -n "error" file.txt # show line numbers
grep -r "TODO" ./src/ # recursive search in directory
grep -v "debug" file.txt # lines NOT matching
grep -E "error|warning" file.txt # extended regex (or)
grep -c "error" file.txt # count matching lines
grep -l "error" *.log # list files that match
# Pipe grep
cat file.txt | grep "hello"
ps aux | grep "nginx"
sort, uniq, wc
# Sort lines
sort names.txt
sort -r names.txt # reverse
sort -n numbers.txt # numeric sort
sort -k2 data.txt # sort by 2nd column
# Remove duplicate lines (input must be sorted)
sort names.txt | uniq
sort names.txt | uniq -c # count occurrences
sort names.txt | uniq -d # only duplicates
# Word/line/character count
wc file.txt # lines, words, bytes
wc -l file.txt # line count only
wc -w file.txt # word count only
ls | wc -l # count files in directory
cut, awk, sed
# cut — extract columns from delimited text
cut -d',' -f1 data.csv # first column, comma-separated
cut -d':' -f1 /etc/passwd # usernames from passwd
# awk — column-based text processing
awk '{print $1}' file.txt # print first column
awk -F',' '{print $2}' data.csv # second column, CSV
awk '{sum += $1} END {print sum}' numbers.txt # sum a column
# sed — stream editor, find and replace
sed 's/old/new/' file.txt # replace first occurrence per line
sed 's/old/new/g' file.txt # replace all occurrences
sed -i 's/old/new/g' file.txt # edit file in place
sed '/pattern/d' file.txt # delete matching lines
sed -n '5,10p' file.txt # print lines 5-10
Pipes and redirection
# Pipe output of one command into another
ls -la | grep ".txt"
cat /etc/passwd | cut -d: -f1 | sort
# Redirect output to file
ls > files.txt # overwrite
ls >> files.txt # append
ls 2> errors.txt # redirect stderr
ls > output.txt 2>&1 # redirect both stdout and stderr
# /dev/null — discard output
command > /dev/null 2>&1 # silence everything
# Here string
grep "hello" <<< "hello world"
Phase 5 — Processes
Viewing processes
# Snapshot of all processes
ps aux
ps aux | grep nginx # find specific process
# Interactive process monitor (like Task Manager)
top
# Press q to quit, k to kill, M to sort by memory
# Better version of top (install with: sudo apt install htop)
htop
# Process tree
pstree
pstree -p # show PIDs
Process fields (ps aux)
| Column | Meaning |
|---|---|
USER |
Owner of the process |
PID |
Process ID (unique number) |
%CPU |
CPU usage |
%MEM |
Memory usage |
STAT |
Status (S=sleeping, R=running, Z=zombie) |
COMMAND |
Command that started the process |
Managing processes
# Kill a process by PID
kill 1234 # send SIGTERM (graceful stop)
kill -9 1234 # send SIGKILL (force kill)
# Kill by name
killall nginx
pkill -f "python script.py"
# Run in background
long-command &
# Output: [1] 4567 (job number and PID)
# View background jobs
jobs
# Bring to foreground
fg %1 # job number 1
# Send running process to background
# Press Ctrl+Z to suspend, then:
bg %1
# Run even after logout (survives terminal close)
nohup long-command &
# Or use screen/tmux for interactive sessions
Job priority (nice)
nice -n 10 heavy-script.sh # lower priority (range -20 to 19)
renice -n 5 -p 1234 # change priority of running process
Phase 6 — Package Management
Installing software on Linux uses a package manager instead of downloading .exe files.
apt (Ubuntu / Debian)
# Update package list (always do this first)
sudo apt update
# Upgrade installed packages
sudo apt upgrade
sudo apt full-upgrade # also handles dependency changes
# Install a package
sudo apt install curl
sudo apt install nginx python3 git # multiple at once
# Remove a package
sudo apt remove nginx
sudo apt purge nginx # also remove config files
# Search for a package
apt search "text editor"
apt show nginx # package info
# List installed packages
apt list --installed
dpkg -l | grep nginx
# Clean up unused packages
sudo apt autoremove
sudo apt clean # clear download cache
dnf / yum (Fedora / CentOS / RHEL)
sudo dnf update
sudo dnf install nginx
sudo dnf remove nginx
sudo dnf search nginx
pacman (Arch Linux)
sudo pacman -Syu # update everything
sudo pacman -S nginx # install
sudo pacman -R nginx # remove
sudo pacman -Ss nginx # search
Package managers compared
| Manager | Distro | Install command |
|---|---|---|
apt |
Ubuntu, Debian | sudo apt install pkg |
dnf |
Fedora, RHEL 8+ | sudo dnf install pkg |
yum |
CentOS 7, RHEL 7 | sudo yum install pkg |
pacman |
Arch, Manjaro | sudo pacman -S pkg |
zypper |
openSUSE | sudo zypper install pkg |
snap |
Ubuntu (universal) | sudo snap install pkg |
flatpak |
Universal | flatpak install pkg |
Phase 7 — Networking
Check network configuration
# IP addresses and interfaces
ip addr show
ip addr show eth0 # specific interface
# Default routes (gateway)
ip route show
# DNS configuration
cat /etc/resolv.conf
# Hostname
hostname
hostname -I # show all IP addresses
Test connectivity
# Ping a host
ping google.com
ping -c 4 google.com # send 4 packets then stop
# Trace route
traceroute google.com
mtr google.com # live traceroute (install: sudo apt install mtr)
# DNS lookup
nslookup google.com
dig google.com
dig google.com A # only A records
Download files
# curl — transfer data to/from URLs
curl https://example.com # download to stdout
curl -o file.html https://example.com # save to file
curl -O https://example.com/file.zip # save with original name
curl -L https://example.com # follow redirects
curl -I https://example.com # headers only
# wget — download files
wget https://example.com/file.zip
wget -c https://example.com/file.zip # resume interrupted download
wget -r https://example.com/ # recursive download
Ports and connections
# List open ports and connections
ss -tuln # listening TCP/UDP ports
ss -tulnp # include process names (needs sudo)
netstat -tuln # older command (install net-tools)
# Check if port is open on remote host
nc -zv google.com 443
telnet google.com 80
SSH — Secure Shell
# Connect to remote server
ssh user@hostname
ssh alice@192.168.1.10
ssh -p 2222 alice@hostname # custom port
ssh -i ~/.ssh/mykey alice@hostname # specific key
# Copy files over SSH
scp file.txt alice@remote:/home/alice/
scp alice@remote:/home/alice/file.txt . # download
scp -r folder/ alice@remote:/home/alice/ # directory
# SSH key setup (passwordless login)
ssh-keygen -t ed25519 -C "your@email.com" # generate key pair
ssh-copy-id alice@remote # copy public key to server
# Now you can login without password
Phase 8 — Shell Scripting
Bash scripts automate repetitive tasks.
Your first script
#!/bin/bash
# My first script — hello.sh
echo "Hello, $1!" # $1 is the first argument
echo "Today is $(date)"
echo "You are: $(whoami)"
# Make it executable and run
chmod +x hello.sh
./hello.sh World
# Hello, World!
# Today is Wed Jul 16 10:00:00 UTC 2025
# You are: alice
Variables
#!/bin/bash
# Assign
name="Alice"
count=5
greeting="Hello, $name"
# Use
echo "$name"
echo "Count: $count"
echo $greeting
# Command substitution
current_dir=$(pwd)
files=$(ls | wc -l)
echo "In $current_dir with $files files"
# Special variables
echo "$0" # script name
echo "$1" # first argument
echo "$#" # number of arguments
echo "$@" # all arguments
echo "$$" # current PID
echo "$?" # exit code of last command
Conditionals
#!/bin/bash
# if / else
if [ "$1" == "hello" ]; then
echo "You said hello!"
elif [ "$1" == "bye" ]; then
echo "Goodbye!"
else
echo "Unknown: $1"
fi
# File checks
if [ -f "/etc/hosts" ]; then echo "File exists"; fi
if [ -d "/tmp" ]; then echo "Is a directory"; fi
if [ -r "/etc/hosts" ]; then echo "Is readable"; fi
# Number comparisons
if [ 5 -gt 3 ]; then echo "5 > 3"; fi
if [ $count -eq 0 ]; then echo "Zero"; fi
| Operator | Meaning |
|---|---|
-eq |
Equal (numbers) |
-ne |
Not equal |
-gt |
Greater than |
-lt |
Less than |
-ge |
Greater or equal |
-le |
Less or equal |
== |
Equal (strings) |
!= |
Not equal (strings) |
-z |
String is empty |
-n |
String is not empty |
-f |
File exists and is regular file |
-d |
Directory exists |
-r / -w / -x |
Readable / writable / executable |
Loops
#!/bin/bash
# for loop — iterate list
for fruit in apple banana cherry; do
echo "Fruit: $fruit"
done
# for loop — C style
for ((i=1; i<=5; i++)); do
echo "Number: $i"
done
# for loop — iterate files
for file in *.txt; do
echo "Processing $file"
wc -l "$file"
done
# while loop
count=1
while [ $count -le 5 ]; do
echo "Count: $count"
((count++))
done
# Read file line by line
while IFS= read -r line; do
echo "Line: $line"
done < /etc/hosts
Functions
#!/bin/bash
# Define function
greet() {
local name="$1" # local variable
echo "Hello, $name!"
return 0
}
backup_file() {
local file="$1"
if [ ! -f "$file" ]; then
echo "Error: $file not found"
return 1
fi
cp "$file" "${file}.backup"
echo "Backed up: $file"
}
# Call functions
greet "Alice"
backup_file "/etc/hosts"
# Check return value
if backup_file "missing.txt"; then
echo "Success"
else
echo "Failed with code: $?"
fi
Practical script: backup with rotation
#!/bin/bash
# backup.sh — backup a directory with date stamp
SOURCE_DIR="$1"
BACKUP_DIR="${2:-/tmp/backups}"
DATE=$(date +%Y-%m-%d_%H-%M-%S)
BACKUP_NAME="backup_${DATE}.tar.gz"
if [ -z "$SOURCE_DIR" ]; then
echo "Usage: $0 <source_dir> [backup_dir]"
exit 1
fi
if [ ! -d "$SOURCE_DIR" ]; then
echo "Error: $SOURCE_DIR is not a directory"
exit 1
fi
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/$BACKUP_NAME" "$SOURCE_DIR"
if [ $? -eq 0 ]; then
echo "Backup created: $BACKUP_DIR/$BACKUP_NAME"
# Keep only last 5 backups
ls -t "$BACKUP_DIR"/backup_*.tar.gz | tail -n +6 | xargs rm -f
else
echo "Backup failed!"
exit 1
fi
Phase 9 — System Administration Basics
Disk usage
# Disk usage by filesystem
df -h
# Filesystem Size Used Avail Use% Mounted on
# /dev/sda1 50G 20G 28G 42% /
# Directory sizes
du -sh /var/log/ # total size of directory
du -sh /var/log/* # size of each item
du -sh * | sort -h # sorted by size
# Find large files
find / -size +100M -type f 2>/dev/null
Users and groups
# Current user info
whoami
id # uid, gid, groups
groups # list groups
# Add user
sudo adduser alice
sudo usermod -aG sudo alice # add to sudo group
# Switch user
su alice
su - # switch to root (with root environment)
sudo -u alice command # run single command as alice
# User info
cat /etc/passwd | cut -d: -f1 # list all users
System info
# OS info
uname -a # kernel version
cat /etc/os-release # distribution info
lsb_release -a # Ubuntu/Debian version
# Hardware
lscpu # CPU info
free -h # memory usage
lsblk # disk/block devices
lspci # PCI devices
lsusb # USB devices
# Uptime and load
uptime
w # who is logged in + load
last # login history
Services (systemd)
# Start / stop / restart services
sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl reload nginx # reload config without restart
# Enable / disable on boot
sudo systemctl enable nginx
sudo systemctl disable nginx
# Status
sudo systemctl status nginx
systemctl is-active nginx
# List services
systemctl list-units --type=service
systemctl list-units --type=service --state=running
# View logs
sudo journalctl -u nginx # nginx logs
sudo journalctl -u nginx -f # follow in real time
sudo journalctl -u nginx --since "1 hour ago"
sudo journalctl -xe # recent errors
Common Linux mistakes
| Mistake | What happens | Correct approach |
|---|---|---|
rm -rf / |
Deletes everything on the system | Always double-check paths before rm -rf |
chmod 777 on sensitive files |
Anyone can read/modify secrets | Use minimal permissions (644 or 600) |
| Running everything as root | Single mistake = full damage | Use sudo only when needed |
sudo rm -rf ./ with wrong directory |
Deletes current directory tree | Print pwd first, use -i flag |
Forgetting sudo apt update |
Installing outdated package | Always update before install |
| Closing terminal killing long jobs | Job stops when terminal closes | Use nohup, screen, or tmux |
Overwriting file with > instead of >> |
Loses existing content | Use >> to append, > to overwrite |
| SSH with password on public internet | Brute force attacks | Use SSH keys, disable password auth |
Linux vs other operating systems
| Feature | Linux | Windows | macOS |
|---|---|---|---|
| Cost | Free | Paid license | Tied to Apple hardware |
| Open source | Yes (mostly) | No | Partly (Darwin kernel) |
| Package manager | apt, dnf, pacman | winget (limited) | Homebrew (unofficial) |
| Customization | Unlimited | Limited | Moderate |
| Gaming | Improving (Steam Proton) | Excellent | Limited |
| Server use | 96% of web servers | Some enterprise | Minimal |
| Learning curve | Moderate | Low | Low-moderate |
| Security | High | Medium | High |
| Hardware support | Excellent (kernel) | Excellent | Apple hardware only |
Essential tools to learn next
| Tool | Purpose | Install |
|---|---|---|
tmux |
Terminal multiplexer, multiple panes | sudo apt install tmux |
vim |
Advanced terminal editor | sudo apt install vim |
git |
Version control | sudo apt install git |
curl / wget |
HTTP requests, downloads | Usually pre-installed |
jq |
Parse and filter JSON | sudo apt install jq |
rsync |
Efficient file sync | sudo apt install rsync |
cron |
Schedule recurring tasks | Built-in |
screen |
Persistent terminal sessions | sudo apt install screen |
strace |
Trace system calls | sudo apt install strace |
lsof |
List open files | Usually pre-installed |
3 beginner projects
Project 1 — System health monitor
#!/bin/bash
# system-health.sh
echo "=== System Health Report ==="
echo "Date: $(date)"
echo ""
echo "--- Uptime ---"
uptime
echo ""
echo "--- Memory ---"
free -h
echo ""
echo "--- Disk ---"
df -h /
echo ""
echo "--- Top 5 CPU processes ---"
ps aux --sort=-%cpu | head -6
echo ""
echo "--- Top 5 Memory processes ---"
ps aux --sort=-%mem | head -6
Project 2 — Log analyzer
#!/bin/bash
# analyze-logs.sh — find errors in log files
LOG_FILE="${1:-/var/log/syslog}"
echo "Analyzing: $LOG_FILE"
echo ""
echo "Total lines: $(wc -l < "$LOG_FILE")"
echo "Errors: $(grep -c -i "error" "$LOG_FILE")"
echo "Warnings: $(grep -c -i "warn" "$LOG_FILE")"
echo ""
echo "=== Recent errors ==="
grep -i "error" "$LOG_FILE" | tail -10
Project 3 — File organizer
#!/bin/bash
# organize.sh — sort files by extension
SOURCE="${1:-.}"
DEST="${2:-./organized}"
mkdir -p "$DEST"
for file in "$SOURCE"/*; do
[ -f "$file" ] || continue
ext="${file##*.}"
ext_dir="$DEST/$ext"
mkdir -p "$ext_dir"
cp "$file" "$ext_dir/"
echo "Moved: $file → $ext_dir/"
done
echo "Done! Files organized in $DEST"
Linux learning path
| Stage | Topics | Time |
|---|---|---|
| 1 — Beginner | Navigation, files, permissions, text viewing | 1-2 weeks |
| 2 — Intermediate | Text processing, processes, networking, package management | 2-4 weeks |
| 3 — Advanced | Shell scripting, system admin, systemd, cron | 1-2 months |
| 4 — Expert | Kernel, networking stack, security hardening, performance tuning | Ongoing |
Practice platforms:
- OverTheWire Bandit — learn Linux through security challenges
- Linux Journey — interactive lessons
- TryHackMe — Linux rooms (free tier)
- HackerRank Linux Shell — practice challenges
- Your own VPS — cheapest way to get real experience ($5/month)
Frequently asked questions
How long does it take to learn Linux? Basic command-line fluency takes 2-4 weeks of daily practice. Being productive on a Linux server takes 1-2 months. Becoming an expert (kernel, networking, security) is an ongoing journey. Focus on one area at a time.
Do I need to memorize all commands?
No. Learn the 20-30 commands you use daily, and know how to find the rest with man <command> (manual pages) or <command> --help. Experienced Linux users look things up constantly.
Is Linux hard to learn compared to Windows? The command line feels unfamiliar at first, but the concepts are logical and consistent. Most beginners feel comfortable within a few weeks. The Linux community is enormous and helpful — solutions to almost every problem are a search away.
Which Linux distribution should I start with? Ubuntu LTS (Long-Term Support). It has the largest community, the most tutorials, and the most software support. Once you're comfortable, explore others if you have a specific need.
Can I use Linux for gaming? Yes, and it keeps getting better. Steam's Proton compatibility layer lets you play thousands of Windows games. Valve's Steam Deck runs Linux. Some games still don't work, but coverage is around 80%+ of top titles.
What's the difference between Linux and Unix? Unix is the original operating system from Bell Labs (1970s). Linux was created in 1991 by Linus Torvalds as a free, open-source Unix-like system. macOS is also Unix-based. Today "Unix" often means "Unix-like" systems including Linux.