Mastering the Linux command line in a short amount of time is definitely achievable!

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:

:spiral_calendar: 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:

  1. Navigate to your home folder (cd ~).
  2. Create a folder structure: mkdir -p projects/test
  3. Create files: touch test1.txt test2.txt
  4. View file contents: cat test1.txt
  5. Use man to 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:

  1. Copy and rename a file: cp test1.txt copy_test1.txt
  2. Move a file: mv copy_test1.txt projects/
  3. Delete a file: rm test2.txt
  4. Check permissions: ls -l
  5. Change permissions: chmod 644 test1.txt
  6. 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:

  1. Search for “error” in syslog: grep "error" /var/log/syslog
  2. Count occurrences: grep "error" /var/log/syslog | wc -l
  3. Sort and remove duplicates: sort names.txt | uniq
  4. 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:

  1. Redirect ls output: ls -l > listing.txt
  2. Append output: echo "New line" >> listing.txt
  3. Pipe commands: ps aux | grep firefox | wc -l
  4. 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:

  1. List environment variables: printenv
  2. Add alias: echo "alias ll='ls -lah'" >> ~/.bashrc && source ~/.bashrc
  3. 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:

  1. Create a script hello.sh:
#!/bin/bash
echo "Hello, $1!"
  1. Run it: chmod +x hello.sh && ./hello.sh World
  2. 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:

  1. Monitor processes: top
  2. Disk usage: df -h
  3. Check connectivity: ping -c 4 google.com
  4. 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:

  1. Script backup.sh:
#!/bin/bash
mkdir -p ~/backup_$(date +%F)
cp ~/Documents/* ~/backup_$(date +%F)/
echo "Backup completed at $(date)" >> ~/backup.log
  1. Make executable: chmod +x backup.sh
  2. Test it: ./backup.sh

Goal: Automate file backups with logging.


Day 9 — Log Analyzer

Goal: Count errors in system logs.
Tasks:

  1. Script log_analyzer.sh:
#!/bin/bash
grep "ERROR" /var/log/syslog | sort | uniq -c > error_report.txt
  1. Run: chmod +x log_analyzer.sh && ./log_analyzer.sh
  2. Optional: Set up cron for daily run.

Goal: Analyze and summarize logs automatically.


Day 10 — Simple Website Downloader

Goal: Fetch web content automatically.
Tasks:

  1. Script download_pages.sh:
#!/bin/bash
mkdir -p ~/webpages_$(date +%F)
while read url; do
  wget -P ~/webpages_$(date +%F) "$url"
done < urls.txt
  1. Prepare urls.txt with some websites.
  2. Run and check downloaded pages.

Goal: Automate downloading web pages.


Day 11 — System Monitoring Script

Goal: Monitor CPU, memory, disk usage.
Tasks:

  1. 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
  1. Run: chmod +x monitor.sh && ./monitor.sh
  2. Optional: Schedule hourly via cron.

Goal: Create a real-time system status report.


Day 12 — User Management Automation

Goal: Automate adding new users.
Tasks:

  1. Script add_users.sh:
#!/bin/bash
while read username; do
  sudo useradd -m "$username"
  echo "$username:password" | sudo chpasswd
done < new_users.txt
  1. Create new_users.txt with sample usernames.
  2. 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.

1 Like

Welcome to the forums @John2025
nice article you wrote, I do automate many task with bash script
and put em inside my local path
life is harder on unix without mastering the shell tbh
I do automate the system with scripts,
I’ve made a QR reader with

sleep 1 && maim -s -u  | zbarimg -

password hasher

echo -n "$2" | sha256sum | head -c 64 | xclip -selection clipboard

compress + encryption

tree | zstd -f | age -e -p > treedir

and hundreds of other wired scripts :slight_smile: