Cheatography
https://cheatography.com
Cheat sheet for linux commands
This is a draft cheat sheet. It is a work in progress and is not finished yet.
HELP Commands
man |
man provides short reference manuals |
info |
A newer form of online help is the info command |
help |
help is a built-in command in the bash shell |
tldr |
community driven man pages |
SYSTEM Commands
uname |
details about the current machine and the operating system |
uptime |
how long the system has been running |
hostname |
Show or set the system's host name |
reboot |
Reboot the system |
date |
Sets or displays the system date |
timedatectl |
Control the system time and date |
cal |
Prints calendar information |
w |
Show who is logged on |
whoami |
Print the username |
HARDWARE Commands
lscpu |
Displays information about the CPU architecture |
lshw |
Detailed information about hardware configurations |
lsblk |
Lists information about devices |
df |
Gives an overview of the filesystem disk space usage |
du |
estimate and summarize file and directory space usage |
free |
Display amount of free and used memory in the system |
|
|
FILE Commands
ls |
List directory contents |
pwd |
Print name of current/working directory |
touch |
Change a file access and modification times (atime, mtime) |
cp |
Copy files and directories |
mkdir |
Creates a directory |
mv |
Move or rename files and directories |
rm |
Remove files or directories |
chown |
Change user and group ownership of files and directories |
chmod |
Change the access permissions of a file or directory |
wc |
Count lines, words, and bytes |
tr |
Translate characters: run replacements based on single characters and character sets |
uniq |
Output the unique lines from the given input or file |
split |
Split a file into pieces |
head |
Output the first part of files |
tail |
Display the last part of a file |
more |
Open a file for interactive reading, allowing scrolling and search |
less |
Open a file for interactive reading, allowing scrolling and search |
cat |
Print and concatenate files |
|
|
NETWORK Commands
ip |
Show / manipulate routing, devices, policy routing and tunnels |
ifconfig |
Network Interface Configurator |
netstat |
Displays network-related information such as open connections, open socket ports, etc |
whois |
Command-line client for the WHOIS (RFC 3912) protocol |
dig |
DNS lookup utility |
nslookup |
Query name server(s) for various domain records |
host |
Lookup Domain Name Server |
hostname |
Show or set the system's host name |
PROCESS Commands
top |
Display dynamic real-time information about running processes |
ps |
Information about running processes |
kill |
Sends a signal to a process, usually related to stopping the process |
|