Tutorials : The Linux Command Line Cheat Sheet
Here is a clean, scannable Linux Command Line Cheat Sheet covering the essential commands you need for daily system administration, file management, and troubleshooting.
1. File & Directory Navigation
pwd— Print working directory (shows exactly where you are).ls— List directory contents.ls -l— Long listing format (shows permissions, owner, size, and date).ls -a— Show all files, including hidden ones (files starting with a dot.).
cd [directory]— Change directory.cd ..— Move up one directory level.cd ~— Go straight to your home directory.
2. File Operations (Create, Copy, Move, Delete)
touch [filename]— Create an empty file.mkdir [dir_name]— Make a new directory.cp [source] [destination]— Copy files.cp -r [source_dir] [dest_dir]— Copy a directory recursively.
mv [source] [destination]— Move or rename a file or directory.rm [filename]— Remove (delete) a file.rm -r [dir_name]— Delete a directory and all its contents recursively.⚠️ Warning:
rmdeletes files permanently. There is no "Trash Bin" via the command line.
3. Viewing & Searching File Content
cat [filename]— Concatenate and display the entire contents of a file.less [filename]— View a file page-by-page (pressqto exit).head -n [filename]— View the first n lines of a file.tail -n [filename]— View the last n lines of a file (usetail -fto follow live log updates).grep "[pattern]" [filename]— Search for a specific string or pattern inside a file.
4. Permissions & System Ownership
sudo [command]— Execute a command with administrative (superuser) privileges.chmod [permissions] [filename]— Change mode (modify read/write/execute permissions).Example:
chmod +x script.shmakes a script executable.
chown [user]:[group] [filename]— Change owner and group of a file.
5. System Information & Process Management
df -h— Show disk free space in a human-readable format.free -h— Display free and used memory (RAM).toporhtop— View active system processes in real-time (resource usage monitor).ps aux— Snapshot of all running processes.kill [PID]— Terminate a process using its Process ID.
6. Network Utilities
ping [host]— Send packets to a host (IP or domain) to check network connectivity.curl [URL]— Fetch data from a URL (great for testing APIs or downloading files).ip a— Show all network interfaces and assigned IP addresses.
Pro-Tips for Speed ⚡
| Shortcut | Action |
| Tab | Autocompletes commands, file names, and paths. Press twice to see all options. |
| Ctrl + C | Kills/stops the currently running terminal command. |
| Ctrl + L | Clears the terminal screen (same as typing clear). |
| history | Displays a numbered list of all commands you've recently typed. |
Read article and print from: Linux Magazin June 2026

Comments
Post a Comment