It is achievable — especially if you approach it strategically. “Mastering” the Linux command line doesn’t mean memorizing every command; it means understanding how to think in Linux — how to combine commands, navigate efficiently, and automate tasks.
Here’s a focused roadmap to help you master it quickly:
A 14-Day Linux Command Line Mastery Plan
Week 1 — Foundations & Core Skills
Day 1 — Navigation & File System
Focus: Moving around and exploring files.
Commands: pwd, ls, cd, mkdir, rmdir, touch, cat, less, man
Exercises:
- Navigate to your home folder (
cd ~). - Create a folder structure:
mkdir -p projects/test - Create files:
touch test1.txt test2.txt - View file contents:
cat test1.txt - Use
manto read about a command:man ls
Goal: Confidently navigate and inspect files.
Day 2 — File Management & Permissions
Focus: Copying, moving, deleting, and securing files.
Commands: cp, mv, rm, chmod, chown, sudo
Exercises:
- Copy and rename a file:
cp test1.txt copy_test1.txt - Move a file:
mv copy_test1.txt projects/ - Delete a file:
rm test2.txt - Check permissions:
ls -l - Change permissions:
chmod 644 test1.txt - Change ownership (if safe):
sudo chown $USER:$USER test1.txt
Goal: Manage files safely and understand permissions.
Day 3 — Searching & Filtering
Focus: Powerful text manipulation.
Commands: grep, sort, uniq, cut, wc, head, tail, find
Exercises:
- Search for “error” in syslog:
grep "error" /var/log/syslog - Count occurrences:
grep "error" /var/log/syslog | wc -l - Sort and remove duplicates:
sort names.txt | uniq - Find files modified today:
find . -type f -mtime -1
Goal: Quickly find and process information.
Day 4 — Redirection & Piping
Focus: Combine commands and redirect input/output.
Commands: >, >>, <, |, $(...)
Exercises:
- Redirect
lsoutput:ls -l > listing.txt - Append output:
echo "New line" >> listing.txt - Pipe commands:
ps aux | grep firefox | wc -l - Command substitution:
echo "Today is $(date)"
Goal: Chain commands and control input/output.
Day 5 — Shell Environment & Aliases
Focus: Personalize your shell.
Commands: export, echo $PATH, .bashrc, alias, source
Exercises:
- List environment variables:
printenv - Add alias:
echo "alias ll='ls -lah'" >> ~/.bashrc && source ~/.bashrc - Add directory to
PATH:export PATH=$PATH:~/bin
Goal: Make the shell more efficient and personalized.
Day 6 — Bash Scripting Basics
Focus: Automate repetitive tasks.
Commands: #!/bin/bash, variables, loops, conditionals, $1, $2
Exercises:
- Create a script
hello.sh:
#!/bin/bash
echo "Hello, $1!"
- Run it:
chmod +x hello.sh && ./hello.sh World - Write a loop script:
#!/bin/bash
for file in *.txt; do
echo "Processing $file"
done
Goal: Start scripting simple tasks.
Day 7 — System & Network Tools
Focus: System monitoring and network commands.
Commands: top, ps, kill, df, du, ping, curl, wget, systemctl, useradd
Exercises:
- Monitor processes:
top - Disk usage:
df -h - Check connectivity:
ping -c 4 google.com - Download a page:
curl -O https://example.com
Goal: Understand system status and basic networking.
Week 2 — Hands-On Mini Projects
Day 8 — Automated File Backup
Goal: Write a script to back up files.
Tasks:
- Script
backup.sh:
#!/bin/bash
mkdir -p ~/backup_$(date +%F)
cp ~/Documents/* ~/backup_$(date +%F)/
echo "Backup completed at $(date)" >> ~/backup.log
- Make executable:
chmod +x backup.sh - Test it:
./backup.sh
Goal: Automate file backups with logging.
Day 9 — Log Analyzer
Goal: Count errors in system logs.
Tasks:
- Script
log_analyzer.sh:
#!/bin/bash
grep "ERROR" /var/log/syslog | sort | uniq -c > error_report.txt
- Run:
chmod +x log_analyzer.sh && ./log_analyzer.sh - Optional: Set up cron for daily run.
Goal: Analyze and summarize logs automatically.
Day 10 — Simple Website Downloader
Goal: Fetch web content automatically.
Tasks:
- Script
download_pages.sh:
#!/bin/bash
mkdir -p ~/webpages_$(date +%F)
while read url; do
wget -P ~/webpages_$(date +%F) "$url"
done < urls.txt
- Prepare
urls.txtwith some websites. - Run and check downloaded pages.
Goal: Automate downloading web pages.
Day 11 — System Monitoring Script
Goal: Monitor CPU, memory, disk usage.
Tasks:
- Script
monitor.sh:
#!/bin/bash
echo "System Status at $(date)" > system_status.txt
df -h >> system_status.txt
free -h >> system_status.txt
ps aux --sort=-%cpu | head -n 6 >> system_status.txt
- Run:
chmod +x monitor.sh && ./monitor.sh - Optional: Schedule hourly via cron.
Goal: Create a real-time system status report.
Day 12 — User Management Automation
Goal: Automate adding new users.
Tasks:
- Script
add_users.sh:
#!/bin/bash
while read username; do
sudo useradd -m "$username"
echo "$username:password" | sudo chpasswd
done < new_users.txt
- Create
new_users.txtwith sample usernames. - Run safely in a test VM.
Goal: Automate repetitive user management tasks.
Day 13 — Combined Script Challenge
Goal: Combine multiple skills in one script.
Task: Create a script that:
- Backs up files
- Analyzes logs
- Monitors system status
- Downloads web pages from a URL list
Challenge: Make it modular, with separate functions for each task.
Day 14 — Review & Personal Project
Goal: Solidify skills and explore your own mini project.
Task Ideas:
- Automate a personal workflow (backup + logs + notifications)
- Build a file organizer that sorts files by type
- Create a system report that emails daily to you
Outcome: Confident, independent command-line user ready to tackle real-world Linux tasks.