These days, few people have not heard of Linux. This open-source operating system was able to open its place among professionals over time and became one of the best operating systems for development thanks to its unique and practical features. In this article, we will introduce the linux cheat sheet, which will create extensive features in Linux.

What is the Linux command cheat sheet?

The command line terminal can be considered a useful option in this operating system, which is considered one of its positive points. Of course, this positive point may cause problems for newcomers because there are so many commands to use in Linux. Therefore, Linux cheat sheet commands may be necessary for beginners and even old users. For example, learning to use the echo command in Linux can be incredibly helpful for beginners, as it allows you to display messages or output in the terminal. You can check out our guide on how to use the echo command in Linux to get started.

linux cheat sheet

Command

usage

Ls

ls –l

ls –a

pwd

cd

file

All the Files in a directory

File with its complete details

Files with its directory

Files with their directory

Change directory location

Showing the type of files

Edit, and Delete in Files and its Directories

mkdir

touch

cat > file

cat file

grep

nano file

vim file

rm or rmdir

rm –r

mv

cp

rsync

new directory

new, empty file, or update the time 

Create a new file with the text 

View the contents of a file

contents of a file with a pattern

file in the nano text editor

 file in the vim text editor

Remove a file

Remove a directory (not empty)

Move or rename a file

Copy a file or directory

changes of one directory to another

Search for Files and Directories

Locate

find

find a file or directory with cached

Search a file or directory based on the name

Basic Administration

whoami

sudo

sudo apt install

sudo dnf install

sudo apt remove

sudo dnf remove

reboot

poweroff

user is currently logged in 

a command with root permissions

Install a Debian-based package 

Install a Red Hat package 

Remove a Debian-based package.

Remove a Red Hat package 

Reboot the system

Shut down the system

Hard Drive and Storage

df or df -h

sudo fdisk -l

du

tree

mount and umount

current storage usage 

information for all attached storage 

disk usage of a directory

the directory structure for a path

Mount and unmount a storage device or ISO file

Compression Commands

tar cf my_dir.tar my_dir

tar cfz my_dir.tar my_dir

gzip file

tar xf file

gunzip file.gz

uncompressed tar archive

a tar archive with gzip 

Compress a file with gzip 

Extract any tar archive

Decompress a gzip file  

Networking

ip a

ip r

cat /etc/resolv.conf

ping

traceroute

ssh

Show IP address 

Show the default gateway in the IP address 

DNS server’s usage

ping request to a network 

Trace the network 

Login to a remote device with SSH

User Management

useradd

adduser

deluser

usermod

groupadd

delgroup

Low-level utility for adding a new user 

High-level utility for adding a new user 

Delete a user 

Modify a user 

Create a new group

Delete a group

System Resource Management

free -m

top

htop

nice

renice

ps aux OR ps -ef

kill or killall

kill -9 or killall -9

bg

fg

memory is in use and free

 list of processes and resource usage

human-readable of top

new process with a specified priority

Change the value of a process

all of the running processes

Terminate a process

 a process with SIGKILL signal

Send a task to the background

Bring a task to the foreground

Environment Variable

printenv or printenv variable_name

whereis and which

export MY_SITE="linuxconfig.org"

echo $VARIABLE

unset

environment variables on a Linux 

where a command in PATH is located

Set a temporary environment 

Display the value of a variable

Remove a variable

Kernel Information and Module Management

uname -a

lsmod

modinfo module_name

modprobe --remove module_name

modprobe module_name

Output kernel version information 

currently loaded modules 

information about module

Remove a module

Load a module into the kernel

Hardware Information

lspci

dmidecode

cat /proc/cpuinfo

x86info or x86info -a

cat /proc/meminfo

lshw

lshw -C memory -short

hwinfo

biosdecode

dmidecode -s bios-vendor

lsusb

ls -la /dev/disk/by-id/usb-*

hdparm -I /dev/sdx

hdparm -tT /dev/sdx

wodim --devices

information about the host bridge

information about BIOS

Retrieve processor type

information about the CPU

detailed information about RAM

List all hardware components 

 RAM slots used, speed, and size

details for all hardware

information about the system’s BIOS

Retrieve the name of BIOS 

Get a list of USB devices 

Retrieve a list of USB device files

information about hard drive’s make, 

speed of an installed hard drive 

Locate the CD or DVD device file

Last word

It is difficult to remember all the commands related to Linux. You may remember a particular command over time, but you will always need a list of linux cheat sheets for easy access. This will also save you time. It is not bad to remember two other commands that are very useful. Man command and apropos command are two commands to search for specific commands. You can also use two items as a manual search tool. So, the next time you are confused, it's okay to use our list or search for the desired command yourself. We offer that you buy Linux server and you practice.

Additionally, if you're looking to explore the basics of using commands, consider checking out our guide on how to use the cat command in Linux.

People also read: