Catalog / Unix Command Line Cheatsheet
Unix Command Line Cheatsheet
A quick reference guide to essential Unix command-line shortcuts and commands for efficient navigation and system management.
Navigation & File Management
Basic Navigation
|
Print Working Directory: Displays the current directory path. |
|
Change Directory: Navigates to the specified directory. |
|
List Directory Contents: Shows files and directories in the current directory. |
|
Make Directory: Creates a new directory. |
|
Remove Directory: Deletes an empty directory. |
|
Create an empty file or update the timestamp of an existing file. |
File Operations
|
Copy: Copies files or directories. |
|
Move/Rename: Moves files or directories, or renames them. |
|
Remove: Deletes files. |
|
Create links between files. |
|
Concatenate and display file content. |
|
View file content page by page. |
Searching & Redirection
Searching Files
|
Find files based on criteria. |
|
Search for patterns within files. |
|
Locate the executable file associated with a command. |
|
Find files by name using a pre-built index. Requires |
Input/Output Redirection
|
Redirect output to a file (overwrites existing content). |
|
Append output to a file (adds to existing content). |
|
Redirect standard error to a file. |
|
Redirect both standard output and standard error to a file. |
|
Pipe: Sends the output of one command as input to another. |
|
Redirect input from a file to a command. |
System Information & Process Management
System Information
|
Print system information. |
|
Disk Free: Shows disk space usage. |
|
Disk Usage: Shows disk space usage of files and directories. |
|
Display amount of free and used memory in the system. |
|
Show how long the system has been running, current time, number of users, and system load average. |
|
Display the current date and time. |
Process Management
|
Process Status: Displays information about active processes. |
|
Display real-time system processes, CPU usage, and memory usage. |
|
Terminate a process. |
|
Kill processes by name. |
|
Resume a stopped process in the background. |
|
Bring a background process to the foreground. |
User Management & Permissions
User Management
|
Display the current user’s username. |
|
Display user ID, group ID, and groups. |
|
Show who is logged on and what they are doing. |
|
List last logged-in users. |
|
Change user password. |
|
Switch user. |
File Permissions
|
Change file permissions. |
|
Change file owner. |
|
Change file group. |
|
Set default file permissions. |
|
Shows permissions for the file. |