Linux Cheat Sheet
by Sky11 via cheatography.com/190795/cs/39698/
File and Directory Management Miscellaneous
ls List files and directories. date Display or set the system date and time.
cd Change the current directory. history View command history.
pwd Print the working directory. man Display the manual pages for commands.
touch Create an empty file. cal Display a calendar.
mkdir Create a new directory. who Show who is logged on.
rm Remove files or directories. uptime Show system uptime.
cp Copy files or directories. watch Execute a command repeatedly and display results.
mv Move or rename files or directories.
File Viewing and Editing
Package Management cat Concatenate and display file contents.
apt / apt-get Package management for Debian-based systems. more / less View file contents one page at a time.
yum Package management for Red Hat-based systems. nano / vim / emacs Text editors for file editing.
dnf Package management for Fedora and CentOS. head Display the beginning of a file.
zypper Package management for openSUSE. tail Display the end of a file.
wc Count lines, words, and characters in a file.
File Compression and Archiving
sed Stream editor for text manipulation.
tar Archive files.
gzip / gunzip Compress or decompress files. Networking
zip / unzip Create or extract zip archives. ping Check network connectivity to a host.
bzip2 / bunzip2 Compress or decompress files with bzip2. ifconfig / ip Network interface configuration.
xz / unxz Compress or decompress files with xz. ssh Securely connect to a remote machine.
scp Securely copy files between machines.
Process Management
netstat Network statistics and active connections.
ps Display currently running processes.
nslookup Query DNS servers for DNS-related information.
kill Terminate processes.
curl Transfer data from or to a server.
top Monitor system processes in real-time.
wget Download files from the web.
ps aux Show detailed process information.
killall Terminate processes by name. System Information
uname Display system information.
File Permissions
df Disk space usage.
chmod Change file permissions.
free Display memory usage.
chown Change file owner and group.
uptime Show system uptime.
umask Set default file permissions for new files.
lsb_release Display Linux Standard Base (LSB) information.
chgrp Change group ownership of a file or directory.
lscpu Display CPU information.
lsattr List file attributes.
lshw List hardware information.
lsblk List block devices.
By Sky11 Published 27th July, 2023. Sponsored by CrosswordCheats.com
cheatography.com/sky11/ Last updated 27th July, 2023. Learn to solve cryptic crosswords!
Page 1 of 2. http://crosswordcheats.com
Linux Cheat Sheet
by Sky11 via cheatography.com/190795/cs/39698/
Text Processing
grep Search for text in files.
sed Stream editor for text manipulation.
awk Text processing and pattern matching.
cut Remove sections from each line of a file.
sort Sort lines of text files.
tr Translate characters in a file.
comm Compare two sorted files line by line.
User Management
useradd / adduser Create a new user.
passwd Change user password.
usermod Modify user account settings.
userdel Delete a user account.
id Display user and group information.
groups Show group membership for a user.
By Sky11 Published 27th July, 2023. Sponsored by CrosswordCheats.com
cheatography.com/sky11/ Last updated 27th July, 2023. Learn to solve cryptic crosswords!
Page 2 of 2. http://crosswordcheats.com