Linux Operating System Commands (For Linux Admins)

Linux is a powerful, versatile, well known and most widely used operating system in the tech world that has gained immense popularity among computer enthusiasts, developers, and server administrators. With its robust command-line interface, Linux offers a wide range of commands that allow users to perform various tasks, from managing files and directories to networking, process control, and system administration.

In this article, you can find a quick reference to Linux Operating System Commands for Linux System Administrators or beginners learning Linux. We've listed an exhaustive table of Linux commands, including their descriptions and examples. Whether you're new to Linux or an experienced user seeking a quick reference, this Linux Operating System Commands Cheat Sheet will be a valuable resource.

Linux Operating System Commands Cheat Sheet:

Here is an exhaustive list of Linux commands in a table format with their descriptions and example:

Cmd Description Example
ls List files and directories in a directory ls /home
cd Change directory cd Documents
pwd Print the current working directory pwd
mkdir Create a new directory mkdir myFolder
rmdir Remove a directory rmdir myFolder
rm Remove files or directories rm file.txt
cp Copy files and directories cp file.txt newfile.txt
mv Move or rename files and directories mv file.txt /home/user/
touch Create a new file touch myfile.txt
cat Display the contents of a file cat file.txt
more Display file content one page at a time more file.txt
less Display file content with backward navigation less file.txt
head Display the first few lines of a file head file.txt
tail Display the last few lines of a file tail file.txt
grep Search for a specific pattern in a file grep "keyword" file.txt
find Search for files or directories find /home -name myfile.txt
chmod Change permissions of a file or directory chmod 755 file.txt
chown Change ownership of a file or directory chown user file.txt
chgrp Change group ownership of a file or directory chgrp group file.txt
ssh Connect to a remote server using SSH ssh username@hostname
scp Copy files between local and remote servers scp file.txt username@hostname:/remote/path
tar Compress or extract files using tar tar -czvf archive.tar.gz file1 file2
gzip Compress files gzip file.txt
gunzip Decompress files gunzip file.txt.gz
wget Download files from the web wget http://example.com/file.txt
curl Transfer data from or to a server curl -O http://example.com/file.txt
ping Test network connectivity ping google.com
ifconfig Display network interface configuration ifconfig
netstat Display network connections and statistics netstat -a
ps Display currently running processes ps aux
top Monitor system processes and resource usage top
kill Terminate a process kill PID
uname Display system information uname -a
df Display disk space usage df -h
du Estimate file and directory space usage du -sh /path
history Display command history history
man Display the manual page for a command man ls
info Display detailed information about a command info tar
alias Create an alias for a command alias ll='ls -l'
su Switch user or become superuser su root
sudo Run a command with superuser privileges sudo apt-get update

With these Linux Commands you can navigate through directories, manipulate files, perform system maintenance, or manage network connections.

List of Linux Commands Compete Cheat Sheet

Who Can Benefit from this Linux Commands Cheat Sheet?

Whether you're a developer, a system administrator, or simply an enthusiast exploring the capabilities of Linux, this article is your go-to guide for mastering the essential Linux commands.

Linux File Permissions: Read, Write and Execute

Linux File Permissions: Read, Write and Execute

Linux command to Check System and Hardware Info of Server/Machine

cat /etc/os-release #shows OS version and info about the Linux distribution

uname -a #provides detailed information about the system (kernel version, architecture, system info, etc.).

hostnamectl #provides information about the system's hostname, OS, and kernel.

Linux command to Check IP address of Server/Machine

ip a

ip addr show #provides detailed information about network interfaces.

hostname -I #gives the IP address of the host.

Linux command to check running process or all processes on a Server

ps aux #lists all running processes.

top #provides a dynamic, real-time view of processes.

Linux command to check running services

systemctl list-units --type=service #shows all active services.

service --status-all #gives a list of services with their statuses.

Linux command to check running ports

ss -tuln #lists open ports and the services using them.

netstat -tuln #does the same, showing the open ports and their states.

Linux command to show MAC address

ip link show #shows the network interfaces along with their MAC addresses.

Linux command to get system time

date #shows the current system date and time.