Linux Commands Cheat Sheet With PDF
Linux Commands Cheat Sheet With PDF
linuxopsys.com/topics/linux-commands-cheat-sheet
uname Displays system information: kernel version, machine type, and more.
uptime Shows current time, system uptime, users, and load averages.
1/10
dmesg Displays messages from the kernel's ring buffer.
File Commands
2/10
ls -al Lists all files, detailed information, in long format.
3/10
ps Displays a snapshot of current processes.
chmod 644 Sets the permissions of the file /data/test.c to be read/write for
/data/test.c the owner, and read-only for the group and others.
chmod 755 /dir1 Assigns read, write, and execute permissions to the owner, and
read and execute permissions to the group and others for the
directory /dir1.
Network Commands
4/10
ip addr show Displays all network interfaces and their
information.
Compression/Archives Commands
5/10
rpm -i pkg_name.rpm Installs the package "pkg_name.rpm" using RPM Package
Manager.
Search Commands
grep pattern file Search for a given pattern within the file.
grep -r pattern dir1 Recursively searches for the specified "pattern" within the
"dir1" directory and its subdirectories
find /home -name Searches "/home" directory for files named "index"
index recursively.
find /home -size Finds files over 10000k size in /home directory.
+10000k
Login Commands
Connect to the host via telnet default Securely connect to the system via SSH default
port 23 port 22
telnet host Connect to the host via telnet default port 23.
6/10
File Transfer Commands
du -sh /dir1 Displays summary of total disk usage size of /dir1, human-
readable.
mount device-path mount- Mounts the device at the specified filesystem mount point.
point
7/10
8/10
9/10
10/10