🐧 System
Linux Command Line Cheat Sheet
This Linux CLI cheat sheet covers the commands you use most in a terminal: navigating directories, managing files and permissions, monitoring processes, searching text, and checking the network. Search to jump straight to a command.
Navigation
Print the current working directory
List all files with sizes, human-readable
Change directory
Return to the previous directory
Files & Directories
Copy files or directories recursively
Move or rename a file
Delete a directory and its contents (careful!)
Create nested directories
Create an empty file or update its timestamp
Print / page through a file
Permissions
Make a file executable
Set read/write for owner, read for others
Change file owner and group
Run a command as the superuser
Processes
List all running processes
Live view of processes and resource use
Forcefully terminate a process
Manage background and foreground jobs
Searching
Recursively search for text with line numbers
Find files matching a pattern
Show the path of an executable
Search your command history
Networking
Fetch just the HTTP response headers
Test connectivity to a host
List listening ports and sockets
Query DNS records for a domain