Essential Linux Command Cheat Sheet for Beginners
A concise reference covering common Linux commands for navigating directories, managing files, viewing processes, handling permissions, searching, and customizing the shell environment, complete with examples and syntax.
This guide provides a quick-reference list of essential Linux commands and their typical usage, organized by functional groups.
Path and Directory Operations
Absolute path example: /etc/init.d Current and parent directories: ./ and ../ Home directory: ~/ Change directory: cd <path> Create directory: mkdir <dir> Create file: touch <file> or vi <file> Copy file: cp <src> <dest> Copy recursively: cp -r <src_dir> <dest_dir> Move/rename: mv <src> <dest> Remove file: rm <file> Remove directory recursively: rm -r <dir> or rmdir <empty_dir> Clear screen: clear Exit shell: exit or Ctrl+C Background execution: append & to a command
Process Management
List processes: ps Show all processes: ps -ef (System V style) or ps -aux (BSD style)
Filter by PID: ps -ef | grep <pid> Show background jobs: jobs -l Bring job to foreground: fg %<job_id> Resume stopped job in background: bg %<job_id> Terminate process: kill [-s SIGNAL] <pid> or kill -9 <pid> List all supported signals: kill -l Disown all running jobs:
disown -rFile Inspection
View file content: cat <file>, more <file>, less <file>, head <file>, tail <file>, vi <file> Paginated view: cat <file> | more Count lines/words/bytes: wc -l <file>, wc -w <file>, wc -c <file> Search text: grep [options] pattern file (use -i to ignore case, -v to invert match)
Search for files: find <dir> -name "pattern", whereis <cmd>, locate pattern List command location:
which <cmd>Permissions
Change mode: chmod u+x file, chmod 751 file, chmod a-wx,a+r file,
chmod -R u+r dirShell Customization
Alias creation: alias la='ls -a' Prompt variables: \u (user), \h (host), \w (full path), \W (basename), \$ (prompt char), \# (command number), \d (date), \t (24‑hour time), \T (12‑hour time), \A (HH:MM), \v (bash version)
View command hash table: hash Arithmetic with built‑in let command
Key bindings: use bind after obtaining the key sequence (e.g., Ctrl+V F12 yields ^[[24~)
System Information
Current terminal: /dev/tty Null device: /dev/null List logged‑in users: who or who am i Network status: netstat IP and interface info: ifconfig Environment variables: env (all) or env VAR (specific)
Disk usage: df -hl (human‑readable), du (directory/file size)
Quota information: repquota (requires root for other users)
Shell Utilities
History of commands: history List all available commands: compgen -c Directory stack: dirs, manipulate with pushd / popd Search for command description: whatis <cmd> The cheat sheet concludes with a reminder that these commands form the foundation for everyday Linux usage and system administration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
