Linux
Basic commands
System Commands
File & Directory Management
List all files + details
List with details
Read file
Look for a given word inside a file
Count number of lines in a file
Print Working Directory
Print full path of a file/directory
Change Directory
Move up one directory level
Copy files
Copy recursively
Rename a file
Move a file
Find all .txt files
Find files larger than 10MB
Search the entire filesystem for any match with the regex pattern
Updates the database used by locate
Look file from the database
Shows the full path of an executable
Creates a directory
Creates a new file/Update timestamps
Delete file
Delete directory
Process Management
List all process running in the system
Detailed list of all processes
Show a detailed process tree with wide output
Show process tree for a specific user
Show process IDs (PIDs) with the tree view
Show real-time process stats
Kill a process
System Management
Check the status of a service
Start a service
Enable a service to start on boot
Print Info about the system
Print Environment
Shows details about all block devices
List PCI devices
Display Disk Usage
Show the size of files and directories in the current directory
Shows the 40 largest directories on the system
Display RAM info
Displays the maximum allowed size of a process's lockable memory
Put a process in the background
List all process in the background
Puts a process into the foreground
Display overall system performance stats
Print stats every 5 seconds
Print stats every 5 seconds for 10 iterations
Show the system uptime
Show info about current login user
Logs
Display login records
Display bad login attempts
Shows log as they are written
Shows logs from the current boot
Shows logs from the previous boot
Shows logs from a specific service
Shows logs from a time range
Show logs by priority level
Priority Levels:
0
(emergency)1
(alert)2
(critical)3
(error)4
(warning)5
(notice)6
(informational)7
(debug)
Shows logs for a specific process
Shows logs from the kernel
Show kernel and boot messages
User/Group Management
Users
Print current user name
Display user and group ID of the current user
id from a specific user
Edit sudoers file
Switch to the root user
Switch to another user
User Management
Creates a new user
Creates a new user with home directory and bash shell
Add user to the sudo group
Set or change password
Set zsh as default shell
Groups
Create group
Delete Group
Add user to group
Permission & Security
File Ownership
Set file permissions to rwxr-xr-x
Adds read permissions for all users
Add execution permission
Change file owner and group
Change group ownership
Prevent world-writable files
Access Control Lists
Show the ACL
Grant read/write permissions to 'user' on file.txt
Security Policies
Display the current SELinux mode
Disable SELinux
File Integrity
Generates a SHA256 file
Generates a MD5 hash
Initialize the Tripwire database
Check the integrity of the system
Generate a report
Networking Command
Display network interfaces and their IP addresses
Display IP addresses of all network interfaces
Bring interface up
Show networks accessible via the VPN
Show listening TCP/UDP ports
Show listening ports and services
Display the Routing Table
Add a route
Delete a Route
Add a Default Gateway
Change a route's metric
Trace the network path to example.com
Chroot
Decrypt the system
Decrypt partition
Mounts the decrypted device
Mounts the boot partion
chroot into a mounted partition
Connect using WPA
WPA
Shows the current connection status for the wpa
Creates the passphrase
Connect using passphrase
Boot/UEFI Management
Displays the current boot entries in the UEFI firmware
deletes the boot entry "0"
Last updated