Lists files with details (permissions, size, etc.).
ls -a
Lists all files, including hidden ones.
cd <dir>
Changes the current directory.
cd ..
Moves up one directory level.
mkdir <dir>
Creates a new directory.
rmdir <dir>
Removes an empty directory.
rm <file>
Deletes a file.
rm -r <dir>
Deletes a directory and its contents recursively.
cp <src> <dest>
Copies files or directories.
mv <src> <dest>
Moves or renames files or directories.
touch <file>
Creates an empty file or updates its timestamp.
cat <file>
Displays file contents.
less <file>
Views large files one page at a time.
head <file>
Displays the first 10 lines of a file.
tail <file>
Displays the last 10 lines of a file.
file <file>
Determines the file type.
🔍 3. File Searching and Filtering
Command
Description
find <path> -name <file>
Searches for files by name.
locate <file>
Finds files using a prebuilt database.
grep <pattern> <file>
Searches for text patterns in files.
grep -r <pattern> <dir>
Searches recursively in directories.
sort <file>
Sorts lines in a file.
uniq
Removes duplicate lines from sorted input.
wc <file>
Counts lines, words, and characters.
cut -d <delim> -f <n>
Extracts specific fields from a file.
awk '{print $1}' <file>
Prints selected columns using awk.
sed 's/old/new/g' <file>
Substitutes text in a file using sed.
⚙️ 4. System Information and Monitoring
Command
Description
uname -a
Displays system information.
top
Shows running processes and system resource usage.
htop
Interactive process viewer (if installed).
ps aux
Lists all running processes.
free -h
Displays memory usage.
df -h
Shows disk space usage.
du -sh <dir>
Shows the total size of a directory.
uptime
Shows how long the system has been running.
lscpu
Displays CPU architecture information.
lsblk
Lists block devices (drives, partitions).
lshw -short
Lists hardware information (requires root).
👥 5. User and Permission Management
Command
Description
who
Shows who is logged in.
users
Displays current logged-in users.
id
Displays user ID and group ID.
adduser <username>
Adds a new user.
passwd <username>
Changes a user’s password.
su <user>
Switches to another user account.
sudo <command>
Executes a command with superuser privileges.
chmod <mode> <file>
Changes file permissions.
chown <user>:<group> <file>
Changes file ownership.
groups
Lists groups a user belongs to.
🌐 6. Networking Commands
Command
Description
ip addr
Displays network interfaces and IP addresses.
ifconfig
Displays network configuration (deprecated).
ping <host>
Tests connectivity to a host.
traceroute <host>
Traces network route to a host.
netstat -tuln
Lists listening ports and services.
ss -tuln
Modern alternative to netstat.
curl <url>
Transfers data from or to a URL.
wget <url>
Downloads files from the internet.
scp <src> <user>@<host>:<dest>
Copies files over SSH.
ssh <user>@<host>
Connects to a remote system via SSH.
📦 7. Package Management
Command
Description
apt update
Updates package index (Debian/Ubuntu).
apt upgrade
Upgrades installed packages.
apt install <package>
Installs a new package.
apt remove <package>
Removes an installed package.
dnf install <package>
Installs a package (Fedora/RHEL).
yum install <package>
Installs a package (older RHEL/CentOS).
snap install <package>
Installs snap packages.
dpkg -l
Lists installed packages.
🧩 8. Compression and Archiving
Command
Description
tar -cvf <file.tar> <dir>
Creates a tar archive.
tar -xvf <file.tar>
Extracts a tar archive.
gzip <file>
Compresses a file using gzip.
gunzip <file.gz>
Decompresses a gzip file.
zip <file.zip> <files>
Creates a zip archive.
unzip <file.zip>
Extracts a zip archive.
🧮 9. Disk and File System Management
Command
Description
mount
Mounts a filesystem.
umount
Unmounts a filesystem.
blkid
Lists block device UUIDs.
fdisk -l
Lists disk partitions.
mkfs.ext4 <device>
Creates a new ext4 filesystem.
fsck <device>
Checks and repairs a filesystem.
🔄 10. Process and Job Control
Command
Description
jobs
Lists background jobs.
bg
Resumes a job in the background.
fg
Brings a job to the foreground.
kill <pid>
Terminates a process by ID.
killall <name>
Terminates all processes by name.
nice -n <value> <cmd>
Runs a command with adjusted priority.
top
Displays real-time process information.
🧰 11. System Administration
Command
Description
systemctl status
Checks the status of system services.
systemctl start <service>
Starts a service.
systemctl stop <service>
Stops a service.
systemctl enable <service>
Enables a service at boot.
journalctl
Views system logs.
shutdown -h now
Shuts down the system immediately.
reboot
Restarts the system.
🧑💻 12. Scripting and Automation
Command
Description
echo "text"
Prints text to the terminal.
read <var>
Reads user input into a variable.
for i in {1..5}; do echo $i; done
Example of a loop in shell.
export <VAR>=<value>
Sets an environment variable.
bash <script.sh>
Executes a shell script.
crontab -e
Edits scheduled tasks.
at <time>
Runs commands at a specified time.
Organized into Modules
Perfect 👍 — you’re about to build a practical, concept-based mastery of Linux system commands.
Here’s the plan: I’ll create a tutorial-style learning guide divided into modules, each focusing on a logical group of commands. Each module will include:
Concept overview (what & why)
Command list with explanations
Illustrative examples
Practice exercises
Let’s start with the full outline first (so you can confirm the structure). After that, I’ll expand each module in detail (and can generate a downloadable PDF later).
🧩 Linux System Commands — Step-by-Step Learning Guide
🗂️ Module 1: Introduction to Linux Shell
What is the shell and terminal?
Shell prompt structure
Basic navigation and help commands (pwd, whoami, man, clear, etc.)
Using history and command recall
📂 Module 2: File and Directory Management
Understanding the Linux file system hierarchy
Creating, deleting, moving, and copying files & directories
Viewing contents with cat, less, head, tail
Practical exercise: Build and navigate your own folder structure
🔍 Module 3: Searching and Filtering Data
Locating files and text content (find, grep, locate)
Using pipes (|) and redirection (>, >>, <)
Text manipulation with sort, uniq, cut, awk, sed
Exercise: Extract useful data from system log files
⚙️ Module 4: System Information and Monitoring
Viewing system information (uname, uptime, df, free, lsblk)
Monitoring CPU, memory, and processes (top, ps, htop)
Checking disk usage (du, df)
Exercise: Identify high-memory processes and summarize system status
👥 Module 5: User and Permission Management
Understanding users, groups, and permissions
Creating and managing users (adduser, passwd)
Changing ownership and permissions (chmod, chown)
Using sudo safely
Exercise: Set up a shared directory with proper access control
🌐 Module 6: Networking Commands
Viewing network interfaces and IPs (ip addr, ifconfig)
Connectivity checks (ping, traceroute)
Using ssh, scp for remote access
Basic network troubleshooting
Exercise: Connect two systems via SSH and transfer files
📦 Module 7: Software Package Management
Understanding package managers (apt, dnf, yum)
Installing, updating, and removing software
Searching for packages
Exercise: Install and configure a new tool (e.g., htop)
🧩 Module 8: Archiving and Compression
Creating and extracting archives (tar, gzip, zip)
Compressing large folders
Exercise: Backup your project directory into a compressed file
🧮 Module 9: Disk and File System Management
Understanding partitions and mounting
Viewing disks (lsblk, fdisk)
Mounting and unmounting file systems
Checking and repairing file systems
Exercise: Mount an external storage device manually
🔄 Module 10: Process and Job Control
Foreground and background processes
Managing jobs (jobs, bg, fg)
Terminating processes (kill, killall)
Exercise: Run multiple tasks and control them interactively
🧰 Module 11: System Administration and Services
Understanding systemd and services
Managing services with systemctl
Viewing logs with journalctl
Shutting down and rebooting safely
Exercise: Enable and monitor a background service
🧑💻 Module 12: Scripting and Automation
Basics of shell scripting
Variables, loops, and conditions
Automating tasks with cron and at
Exercise: Write a simple backup automation script
🧭 Module 13: Putting It All Together
Building your own Linux toolbox
Daily system health checks using combined commands
Mini project: Create a diagnostic script using all learned concepts