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.
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.