Advanced Linux Commands Cheat Sheet [Free PDF Download]

A Linux command is a particular instruction that is written in the Linux terminal to execute specific tasks. Like Graphical User Interface(GUI) Linux commands are used for navigating files and directories, changing permissions, installing packages and configuring applications and so on. Advanced Linux commands are somewhat more powerful than basic commands. A few keystrokes of an advanced command can perform tasks in seconds that may take hours while using GUI. In this article, I will give you a cheat sheet for the Advanced Linux Commands with free downloadable links.

Download Advanced Linux Commands Cheat Sheet

Available Download Options


Most Popular

PDF (3 Pages)

DOC (3 Pages)

Combo Pack

ZIP (pdf, docx, png)

What is a Linux Command?

Whatever you type in the terminal application to communicate with the Linux operating system is a Linux command. Linux commands are highly customizable and you can make your own command using Bash. Moreover, there are already available advanced commands that can handle large amounts of data and automate repetitive tasks. For clear understanding here is the structure of a Linux command.

Command -options arguments parameters

Advanced Linux Commands List

You can categorize Linux commands into various types such as File Manipulation, Network Commands and Hardware Based Commands etc. Here I prepared a list of advanced commands of each category that may help you to perform crucial tasks on your machine.

File Management Commands

There are a variety of file management commands in the Linux Operating System. One can create, copy, move and delete files and directories using these commands. Here is a short list of advanced Linux file management commands.

Command Description
scp Copies files between host over a network
rsync -a Synchronizes files and directories between two different locations
ls -al Displays list of all files and directories including hidden files
ln Creates symbolic(symlink) links between files and directories
file Identifies the type of a file
rm -rf Recursively deletes all the files and sub-directories
more Views the content of a file on one screen at a time
xargs Builds and execute command lines from standard input
gpg -c Symmetrically encrypts files
gpg -d Symmetrically decrypts files
cmp Compares two files byte by byte
comm Compares two sorted files line by line
stat Displays file or file system status
split Splits a file into pieces
cut Removes sections from each line of a file
paste Merges lines of files
install Copies files and set attributes
jed Simple text editor
vi Visual text editor
sed Stream editor for filtering and transforming text

User Management Commands

In Linux, a user has the privilege of adding new user, modifying existing user and assigning or revoking permissions of a user or group on the system. Here I will make a short list of the most used advanced user management commands.

Command Description
last Displays the list of previously logged in users
adduser Creates a new user on the system
usermod Modifies attributes of an existing user
deluser Deletes an existing user from the system
delgroup Deletes an existing group from the system
groups Prints group membership of a user

System Commands

Linux system commands can be employed for a wide range of functions. But the basic task of system commands is easy interaction with the operating system from the terminal.

Command Description
chage Changes user password expiry information
fsck File system consistency check and repair
sestatus Shows SELinux status information
iptables Administration tool for IPv4 packet filtering and NAT
service Starts, stops and restarts services

Shell Built-ins Commands

Shell built-in commands are not executable like the system commands. However, these commands are useful for performing similar tasks.

Command Description
declare Declares variables and give them attributes
enable Enables and disables shell built-ins
exec Replaces the current shell with another command
jobs Lists active jobs and their status

Process Related Commands

One can control, monitor and manipulate processes of a Linux system. A few advanced process related commands are listed below.

Command Description
pmap Reports the memory map of a process
top Shows real-time dynamic display of the running processes
kill pid Terminates specific process
pkill Terminates one or more processes based on attributes
bg Resumes a suspended job in the background
fg Brings a background job to the foreground
renice Changes the priority of a running system
pgrep Searches for a process by name
pstree Shows system processes in a hierarchical tree structure

File Compression Commands

Linux offers a couple of file compression and extraction commands that allow users to effectively manage their storage.

Command Description
tar -cf Creates an archive file and compresses one or more file into it
tar -xf Extracts files and directories from a tar file
tar -zcvf Creates an archive tar file and compresses one or more files while showing the progress
gunzip Decompresses the compressed files
rar Create, manage RAR archive files
unrar Extract files from RAR archives
7z Create, manage and extract files from 7z archives

Hardware Based Commands

The hardware based commands on Linux are used for interacting with computer hardwares from the terminal window. These commands allow users to configure and manage hardware components of the system. Here is a brief list of advanced hardware based commands.

Command Description
dmesg Displays bootup messages
Ishw Lists hardware information of the system
Isblk Lists information about available block devices
free Displays information about system’s memory
lspci Displays list of all PCI bushes and devices
lsusb Displays information about USB bushes and devices
demidecode Reports the system’s BIOS information
biosdecode Displays system’s BIOS firmware information
hdparm -I /dev/sda Displays information about first hard drive
hwinfo  –short Displays summary of hardware information
wodim Burns CDs, DVDs and Blu-ray discs
badblocks Checks damaged or unreadable blocks in storage
x86info -a Displays general information about CPU

Network Commands

Network commands are mostly used for managing and troubleshooting network connections. Using these types of commands a user can diagnose network problems, change network settings and monitor network traffic from the command line.

Command Description
ip addr show Displays information about network interfaces
ip address add Adds a new IP address to a network interface
ifconfig Configures network interfaces with specific IP address
ping  host Tests connectivity to a host
whois Retrieves information about a domain
dig Retrieves DNS records of a domain
traceroute Traces the route of a host
ssh Secures encrypted communication
netstat -pnltu Displays information of active TCP and UDP connections
host Obtains information about a domain name or IP address
hostname -i Displays IP address of current hostname
telnet Establishes remote connection
finger Displays user information
ftp File Transfer Protocol client
sftp Secures File Transfer Protocol client
nslookup Queries Internet name servers interactively

Disk Usage Commands

One can easily allocate disk space, create or delete partitions and format file systems quite efficiently using the Linux commands listed below.

Command Description
df -h Displays free and used spaces on the file system
df -i Displays inode usage on the file system
fdisk -l Lists available disk partition and their sizes
du -sh Shows total size and of a directory or file
findmnt Shows list of currently mounted file systems
mount Mounts a device to specific directory
umount Unmounts a currently mounted file system
tree Displays directory structure in a tree format

Install Packages Commands

There are several package management commands for installing, upgrading and removing packages in the Linux Operating System.

Command Description
rpm -e Removes a package installed via RPM
rpm -i Install a package via RPM

Kernel Information and Module Management Commands

An user can easily retrieve information about the currently running kernel and other system parameters from the terminal window. Kernel information commands are super useful for troubleshooting kernel related issues and changing kernel settings.

Command Description
uname -a Display kernel version
ismod Check currently loaded kernel module
modinfo Display information of about a kernel module
modprobe –remove Unload a kernel module from memory

Miscellaneous Commands

This section contains many other useful commands regardless of their category. A quick glance at these may save hours of learning commands from the beginning.

Command Description
vmstat Reports virtual memory statistics
alias Creates a shortcut for a longer command
unalias Removes previously created alias
ufw Manages firewall rules
tr Translate or delete characters from a text stream
tty Print the file name of the terminal connected to standard input
time Measure execution time of a command
printenv Print values of all environment variables
make Builds executable programs and libraries from source code
whereis Locate binary, source and manual page of a command
which Returns the pathname of file
unset Removes value of an environment variable
tee Read Standard Input and writes it both to Standard Output and other file
awk Extracts and manipulates text data
crontab Instructions for running scheduled job
chroot Changes the root directory for the current process
timedatectl Changes system clock and time-zone
at Schedule commands to run at a specific time
bash A shell command interpreter
egrep Search files for lines matching a pattern using extended regular expressions
env Display and modify environment variables
getend Print the end of a file
lsof List open files and their associated processes
mkfs Create a file system on a device
neofetch Displays system information in the terminal
uptime Shows system uptime and load averages
screen Terminal multiplexer with session management
patch Apply changes to files using a diff file
batch Scheduled jobs to run at a later time when system resources are available
strace Trace system calls and signals of a program and its child processes
curl Transfer data from or to a server using variety of protocols
rsyslog Manages system logs and forwarding them to other systems
journalctl View and manipulate logs from the system journal
source Read and execute file content in the current shell
let Assign an integer value to a variable
uniq Remove or identify duplicate lines of a file
set List name of all shell variables and functions

Conclusion

In conclusion, the above listed commands will definitely help a power user to do his job within the quickest amount of time. On the other hand, the list can be useful for learners as well to get a hands-on experience of advanced Linux commands. No matter whether the list helps you or not feel free to comment below whatever comes to your mind just after seeing the list.

Rate this post
Md Zahidul Islam Laku

Md Zahidul Islam Laku

Hey, I'm Zahidul Islam Laku currently working as a Linux Content Developer Executive at SOFTEKO. I completed my graduation from Bangladesh University of Engineering and Technology (BUET). I write articles on a variety of tech topics including Linux. Learning and writing on Linux is nothing but fun as it gives me more power on my machine. What can be more efficient than interacting with the Operating System without Graphical User Interface! Read Full Bio

We will be happy to hear your thoughts

Leave a reply

LinuxSimply
Logo