Skip to main content

100+ Linux Commands Cheat Sheet 2026

A practical terminal reference with more than 100 Linux commands, organized by task, with worked examples, keyboard shortcuts, and habits that help you avoid costly mistakes.

By NavTech Solution9 min read
In this tutorial
  1. Introduction
  2. Basic commands
  3. File management
  4. Viewing and text processing
  5. Users and permissions
  6. System information
  7. Process management
  8. Networking
  9. Package management
  10. Compression and archives
  11. Services and logs
  12. Keyboard shortcuts
  13. Practical examples
  14. Best practices
  15. FAQ
  16. Conclusion

Introduction

Linux is one of the most widely used operating system technologies in the world. Whether you are a beginner learning Linux, a developer managing applications, or a system administrator working with servers, understanding Linux terminal commands can make your daily work easier.

The Linux command-line interface (CLI) allows users to manage files, install software, monitor system performance, troubleshoot networks, and automate repetitive tasks.

In this comprehensive Linux Commands Cheat Sheet 2026, you will discover more than 100 useful Linux commands and command examples, organized into easy-to-understand categories.

Most examples work with common Linux distributions such as Ubuntu, Debian, Fedora, and Linux Mint. Some commands require additional packages or administrator privileges.

1. Basic Linux Commands

These commands help you navigate and interact with the Linux terminal.

CommandDescription
pwdDisplay current working directory
lsList files and directories
ls -lShow detailed file information
ls -aShow hidden files
ls -lhShow readable file sizes
cd /homeNavigate to the /home directory
cd ..Move to parent directory
cd ~Go to home directory
cd -Return to previous directory
clearClear the terminal
historyDisplay command history
whoamiDisplay current username
dateDisplay system date and time
hostnameDisplay hostname
man lsOpen the manual for ls

Practical example:

Bash
pwd
ls -la
cd ~/Documents

These commands display your current location, list files including hidden files, and navigate to your Documents folder.

2. Linux File and Directory Management Commands

File management is one of the most important skills for anyone using Linux.

CommandDescription
mkdir projectCreate a new directory
mkdir -p a/b/cCreate nested directories
touch file.txtCreate an empty file
cp file1 file2Copy a file
cp -r dir1 dir2Copy directory recursively
mv old.txt new.txtRename a file
mv file.txt /tmp/Move a file
rm file.txtDelete a file
rm -i file.txtAsk before deleting a file
rmdir emptydirRemove an empty directory
ln -s target shortcutCreate a symbolic link
file image.pngIdentify file type
stat file.txtDisplay file metadata
basename /tmp/test.txtShow filename component
dirname /tmp/test.txtShow directory component

Practical example:

Bash
mkdir linux-practice
cd linux-practice
touch notes.txt
cp notes.txt backup.txt
ls -l

This example creates a working directory, adds an empty file, creates a backup copy, and displays the results.

Be cautious with rm, especially when working with entire directories. Deleted files may not be recoverable.

3. Linux File Viewing and Text Processing Commands

Linux provides powerful tools for reading, searching, and processing text files.

CommandDescription
cat file.txtDisplay file contents
less file.txtRead a file page by page
head file.txtShow first 10 lines
tail file.txtShow last 10 lines
tail -f app.logFollow log updates
wc -l file.txtCount lines
wc -w file.txtCount words
sort file.txtSort lines
uniq file.txtRemove adjacent duplicate lines
cut -d: -f1 file.txtExtract first colon-separated field
grep "error" app.logSearch matching text
grep -i "error" app.logSearch case-insensitively
sed 's/old/new/g' file.txtReplace text in output
awk '{print $1}' file.txtPrint first whitespace-separated field
diff file1 file2Compare two files

Practical example:

Bash
grep -i "error" app.log
tail -n 20 app.log
wc -l app.log

These commands help you find errors, examine recent log entries, and count the number of lines in a log file.

4. Linux User and Permission Commands

Linux uses ownership and file permissions to control access to system resources.

CommandDescription
idDisplay user and group IDs
whoShow logged-in users
usersList logged-in usernames
groupsDisplay user group memberships
passwdChange your password
sudo commandRun command with elevated privileges
chmod 755 script.shSet file permissions
chmod +x script.shAdd executable permission
chmod 644 file.txtSet common file permissions
chown user file.txtChange file owner
chgrp developers file.txtChange group ownership
umaskShow permission creation mask

Understanding Linux Permissions

Linux permissions use three main access types:

  • Read (r): View file contents.
  • Write (w): Modify file contents.
  • Execute (x): Execute a file or access a directory appropriately.

For example:

Bash
chmod 755 script.sh

This grants read, write, and execute permissions to the owner, while allowing the group and other users to read and execute the file.

5. Linux System Information Commands

System information commands help monitor hardware, operating system details, and resource usage.

CommandDescription
uname -aDisplay kernel and system information
uname -rShow kernel release
uptimeShow uptime and load averages
free -hDisplay memory usage
df -hDisplay filesystem space
du -sh folder/Show directory size
lsblkList block devices
lscpuDisplay CPU information
lspciList PCI devices
lsusbList USB devices
hostnamectlShow hostname and system information
timedatectlDisplay time settings

Practical example:

Bash
free -h
df -h
uptime

These commands provide a quick overview of your computer's memory, storage space, and operating time.

6. Linux Process Management Commands

Linux processes are running instances of applications or system services.

CommandDescription
psShow processes for current terminal
ps auxList system processes
topMonitor active processes
htopInteractive process monitor, if installed
pgrep nginxFind process IDs by name
pidof nginxDisplay process IDs
kill PIDRequest process termination
kill -9 PIDForce termination
pkill nginxSignal matching processes
jobsDisplay current shell jobs
bgResume a stopped job in background
fgBring a shell job to foreground
nice -n 10 commandRun process with adjusted priority

Use kill -9 only when normal termination does not work, because forced termination prevents a process from cleaning up normally.

7. Linux Networking Commands

Networking commands are especially useful for developers, IT support teams, and server administrators.

CommandDescription
ip addrDisplay network interfaces and IP addresses
ip routeShow routing table
ping example.comTest network connectivity
ss -tulnList listening TCP/UDP sockets
curl -I https://example.comFetch HTTP response headers
wget https://example.com/file.zipDownload a file
hostname -IDisplay assigned IP addresses
dig example.comQuery DNS records
traceroute example.comTrace network route
ssh user@serverConnect to remote server
scp file.txt user@server:/tmp/Copy file to remote host
rsync -av source/ destination/Synchronize files
nmcli device statusShow NetworkManager device status

Some tools, including dig, traceroute, and nmcli, may need installation or may not be available on every distribution.

8. Linux Package Management Commands

Package managers simplify installing, upgrading, and removing software.

The following commands apply to Ubuntu, Debian, and other APT-based distributions.

CommandDescription
sudo apt updateRefresh repository package indexes
sudo apt upgradeUpgrade installed packages
sudo apt install gitInstall Git
sudo apt remove gitRemove Git
sudo apt purge gitRemove Git and package configuration
apt search nginxSearch for packages
apt show nginxDisplay package details
apt list --installedList installed packages
sudo apt autoremoveRemove unused dependencies
apt-cache policy nginxShow available package versions

Practical example:

Bash
sudo apt update
sudo apt install git
git --version

This refreshes package information, installs Git, and checks its installed version.

The Ubuntu documentation recommends updating package indexes before performing upgrades or installing software when fresh repository information is required.

9. Linux Compression and Archive Commands

Compression utilities make it easier to store, transfer, and back up files.

CommandDescription
tar -cf files.tar folder/Create TAR archive
tar -xf files.tarExtract TAR archive
tar -czf files.tar.gz folder/Create compressed TAR archive
tar -xzf files.tar.gzExtract compressed TAR archive
gzip file.txtCompress file with gzip
gunzip file.txt.gzDecompress gzip file
zip -r files.zip folder/Create ZIP archive
unzip files.zipExtract ZIP archive

Practical example:

Bash
tar -czf project-backup.tar.gz project/

This creates a compressed archive of the project directory.

10. Linux Service and Log Management Commands

Most modern Linux distributions use systemd to manage system services.

CommandDescription
systemctl status nginxCheck Nginx service status
sudo systemctl start nginxStart Nginx
sudo systemctl stop nginxStop Nginx
sudo systemctl restart nginxRestart Nginx
sudo systemctl enable nginxEnable Nginx at startup
sudo systemctl disable nginxDisable automatic startup
systemctl list-units --type=serviceList loaded service units
journalctl -bView logs from current boot
journalctl -u nginxView Nginx service logs
journalctl -fFollow new journal entries

These commands are particularly useful when maintaining websites, APIs, or Linux servers.

11. Linux Terminal Keyboard Shortcuts

Knowing keyboard shortcuts can improve your productivity significantly.

ShortcutAction
Ctrl + CInterrupt running command
Ctrl + ZSuspend foreground process
Ctrl + LClear terminal display
Ctrl + AMove to beginning of command
Ctrl + EMove to end of command
Ctrl + UDelete from cursor to line start
Ctrl + KDelete from cursor to line end
Ctrl + WDelete previous word
Ctrl + RSearch command history
Ctrl + DSend EOF or exit shell
TabComplete commands and filenames
Alt + .Insert last argument from history

These shortcuts are common in Bash with typical readline settings, but behavior can vary depending on your shell and terminal configuration.

12. Five Practical Linux Command Examples

Example 1: Find Large Files

Bash
find ~/Downloads -type f -size +100M

Find files larger than 100 MiB in your Downloads folder.

Example 2: Find Recently Modified Files

Bash
find ~/Documents -type f -mtime -7

Find files modified within approximately the last seven days.

Example 3: Check Server Storage

Bash
df -h
du -sh /var/log

Examine filesystem space and the total size of system logs.

Example 4: Monitor Application Logs

Bash
sudo journalctl -u nginx -f

Follow new log entries for the Nginx service.

Example 5: Create a Project Backup

Bash
cp -a project/ project-backup/

Create a copy of the project directory, preserving many file attributes.

13. Best Practices for Using Linux Commands

Following good habits helps you avoid mistakes and maintain system security.

  1. Read command documentation using man or --help.
  2. Check file paths carefully before removing or overwriting anything.
  3. Avoid using sudo unless administrator access is necessary.
  4. Regularly update your system with your distribution's package manager.
  5. Create backups before modifying important files.
  6. Practice potentially destructive commands in a test environment.
  7. Avoid running shell scripts from untrusted websites.
  8. Learn how Linux file permissions work.

Frequently Asked Questions

Q1. What are the most important Linux commands for beginners?

Some essential commands include ls, pwd, cd, mkdir, cp, mv, cat, grep, find, and chmod.

Q2. How can I learn Linux commands quickly?

Practice basic terminal commands every day. Begin with navigating directories, creating files, copying documents, and reading system information.

Q3. Are Linux commands the same on Ubuntu and Fedora?

Many basic commands are the same, but package management differs. Ubuntu commonly uses APT, while Fedora uses DNF.

Q4. Which Linux commands are useful for web developers?

Web developers frequently use git, ssh, scp, curl, grep, find, chmod, and package management commands.

Q5. How do I display all available Linux commands?

You can explore command documentation using man, apropos, and shell-specific tools. There is no single universal list because installed software and available commands vary between systems.

Q6. Is learning Linux commands useful in 2026?

Yes. Linux commands remain valuable for software development, cloud infrastructure, DevOps, cybersecurity, and system administration.

Conclusion

Learning Linux commands is an important step toward becoming more confident with operating systems, servers, and development environments.

This 100+ Linux Commands Cheat Sheet 2026 provides a practical reference covering navigation, file management, permissions, networking, package installation, processes, and system monitoring.

Beginners should start with fundamental commands and gradually explore more advanced administration tools.

With regular practice, Linux commands can help you perform everyday tasks efficiently and develop valuable technical skills.

Bookmark this Linux cheat sheet and use it whenever you need a quick terminal command reference.