Essential Linux Commands
Essential Linux Commands
Online
Linux
Commands
Cheat Sheet
</>
Linux Commands Cheat Sheet 1
Directory
cd cd.. cd- pwd rmdir
navigate through files move one move to your show the directory delete a directory
and directories directory up previous directory currently working in and its contents
Disk Usage
df du fdisk -l du -ah
get a report on the system’s check the disk space show disk partitions, show disk usage for
disk space usage usage of a file or directory sizes, and types all files and directory
du -sh findmnt
show disk usage of show target mount point
the current directory for all filesystems
File Commands
ls ls -R ls -a ls -al
list files in list all files in list all hidden files list all files and directories with detailed
a directory the sub-directories information like permissions, size, owner, etc
File Commands
rm -r [directory_name] rm -rf [directory_name] wc
remove a directory recursively remove a directory recursively without print the number of words,
requiring confirmation lines, and bytes in a file
cp -r [directory_name1] [directory_name2] mv
recursively copy the contents of the first directory into the second directory to move or rename files
Network
ip addr show ifconfig netstat -pnltu netstat -nutlp
show IP addresses and show IP addresses of show active ports show more information
network interfaces all network interfaces about a domain
System User
uname -r last reboot id passwd
show system show system show details add a password to
information reboot history of the user a user’s account
userdel [user_name]
hostname -i uptime remove a user
show the IP address show how long the system
of the system has been running, including
load average
Keyboard Shortcuts
Ctrl + E Ctrl + A Ctrl + C Ctrl + W
move to the end move to the beginning stop and terminate cut one word before the cursor
of the line of the line the current command and add it to the clipboard
!! exit
repeat the last command log out of the current session
Use It Today