ip addr showDisplays network interfaces & IP info
ip link set eth0 down / upDisables/enables a network interface
dhclient eth0Obtains IP via DHCP on eth0
ping <host>Tests connectivity
traceroute <host>Traces route to a remote host
tracepath <host>Similar to traceroute, less privileged
ss -tulnp / netstat -tulnpShows listening ports & processes
route -nDisplays the routing table
arp -aShows ARP cache
nslookup <domain> / dig <domain>DNS resolution tools
lsLists files and directories
cd <directory>Changes directory
mkdir <directory>Creates a new directory
rm <file>Removes a file
cp <source> <destination>Copies files
mv <source> <destination>Moves files
chmod <permissions> <file>Changes file permissions
chown <user>:<group> <file>Changes file ownership
ifconfigDisplays network interface configuration
topDisplays and updates sorted information about processes
ps auxDisplays information about running processes
kill <PID>Terminates a process
sudo <command>Executes a command with superuser privileges
find <path> <criteria>Finds files and directories
grep <pattern> <file>Searches for patterns in files
sed <command> <file>Streams a file, edits it, and saves it
awk <command> <file>Pattern scanning and text processing language
cut <options> <file>Removes sections from each line of files
sort <options> <file>Sorts lines of text files
uniq <options> <file>Reports or omits repeated lines
wc <options> <file>Prints newline, word, and byte counts for each file
head <file>Outputs the first 10 lines of a file
tail <file>Outputs the last 10 lines of a file
cat <file>Concatenates files and prints on the standard output
less <file>Displays file contents one screen at a time
man <command>Displays the manual page for a command
historyDisplays a list of previously executed commands
echo <text>Displays text on the terminal
printf <format> <arguments>Formats and prints data
dateDisplays the current date and time
calDisplays a calendar
whoamiDisplays the current user's username
passwdChanges the user's password
sudoExecutes a command with superuser privileges
apt update && apt upgradeUpdates and upgrades packages (Debian/Ubuntu)
yum updateUpdates packages (Red Hat/CentOS/Fedora)
dnf updateUpdates packages (Fedora)
pacman -SyuUpdates packages (Arch Linux)
apt-get install <package>Installs a package (Debian/Ubuntu)
yum install <package>Installs a package (Red Hat/CentOS/Fedora)
dnf install <package>Installs a package (Fedora)
pacman -S <package>Installs a package (Arch Linux)
apt-get remove <package>Removes a package (Debian/Ubuntu)
yum remove <package>Removes a package (Red Hat/CentOS/Fedora)
dnf remove <package>Removes a package (Fedora)
pacman -R <package>Removes a package (Arch Linux)