Why Linux Matters: 60 Essential Commands Every IT Professional Should Know

Published by

on

Illustration of a glowing terminal window with a Linux penguin silhouette on a navy and teal background
Illustration of a glowing terminal window with a Linux penguin silhouette on a navy and teal background

Linux matters because it delivers stability, security, and performance at a level few operating systems can match. It is open source, highly customizable, and efficient, which makes it ideal for servers, cloud platforms, development environments, and embedded systems. Its permission model, transparency, and massive global community make it one of the most secure and fastest-improving operating system ecosystems in the world.

For IT professionals, developers, and system administrators, Linux is essential because it powers the majority of modern infrastructure, from cloud servers and supercomputers to routers, IoT devices, and Android phones. Learning Linux gives you real insight into how operating systems, networking, automation, and security work, which makes it a foundational skill for anyone pursuing a serious career in technology.

The reference below groups the commands you need to learn into 17 practical sections, moving from everyday basics to more advanced tools. Each entry shows what the command does and an example you can try right away.

Linux Command Reference Guide

1. Navigation Commands

pwd (Print Working Directory): shows your current location in the filesystem.

pwd

ls (List Directory Contents): views the files and directories inside a folder.

ls -lh /var/log

cd (Change Directory): moves between directories.

cd /etc

tree (Display Directory Structure): shows a visual tree of folders and subfolders.

tree -L 2

find (Search for Files and Directories): locates files by name, type, or pattern.

find . -name "*.txt"

2. File and Directory Management

mkdir (Create Directory): creates new folders. The -p flag creates parent folders as needed.

mkdir -p src/api/v1

rmdir (Remove Empty Directory): deletes folders that contain no files.

rmdir old_folder

rm (Remove Files or Directories): deletes files or entire directory trees. Be careful: there is no recycle bin, so deleted files cannot be easily recovered.

rm -r build/

cp (Copy Files or Directories): duplicates files or folders.

cp -r src backup/

mv (Move or Rename Files): moves files or renames them.

mv notes.txt archive/

touch (Create Empty File or Update Timestamp): creates blank files or updates a file’s modification time.

touch README.md

cat (Display File Contents): prints the entire content of a file.

cat /etc/hostname

less (View File Content Page by Page): reads long files interactively.

less /var/log/syslog

head / tail (View Beginning or End of File): quickly checks the first or last lines of a file. With -f, tail follows new lines as they are written.

tail -f app.log

3. Permissions and Ownership

chmod (Change File Permissions): sets read, write, and execute permissions.

chmod 644 notes.txt

chown (Change File Owner or Group): assigns ownership of files or directories.

sudo chown www-data:www-data site/

id (Display User Identity Information): shows your UID, GID, and group memberships.

id

4. User and Account Management

useradd (Create New User Account): adds new system users.

sudo useradd alice

passwd (Set or Change User Password): assigns or updates passwords.

sudo passwd alice

userdel (Delete User Account): removes users from the system.

sudo userdel alice

sudo (Execute Command as Superuser): runs administrative commands.

sudo systemctl restart nginx

whoami (Display Current Logged-In User): checks which user account is active.

whoami

5. System Information

uname (Show Kernel and System Details): displays the OS type, kernel version, and architecture.

uname -a

hostname (Display System Hostname): checks or identifies the machine name.

hostname

uptime (Show System Load and Running Time): monitors how long the system has been running.

uptime

free (Display Memory Usage): checks RAM and swap usage.

free -h

lscpu (Show CPU Architecture Information): views CPU cores, threads, and architecture.

lscpu

df (Show Disk Space Usage): checks available and used disk space.

df -h

du (Show Directory Size): measures how much space a directory uses.

du -sh /var/log

6. Process and System Monitoring

ps (List Running Processes): views active processes.

ps aux

top (Real-Time Process Viewer): monitors CPU, memory, and processes live.

top

htop (Enhanced Interactive Process Viewer): a colorful, user-friendly alternative to top.

htop

kill (Terminate Process by PID): stops a specific process.

kill 1234

killall (Terminate Processes by Name): kills all processes with a given name.

killall firefox

systemctl (Manage System Services): starts, stops, enables, or checks services.

sudo systemctl restart ssh

7. Networking Commands

ping (Test Network Connectivity): checks whether a host is reachable.

ping google.com

wget (Download Files from the Internet): fetches files over HTTP or HTTPS.

wget https://example.com/file.zip

curl (Transfer Data to or from URLs): handles API calls, downloads, and endpoint testing.

curl https://api.example.com

ssh (Secure Remote Login): connects to remote servers.

ssh user@192.168.1.10

scp (Secure Copy Over SSH): transfers files between machines.

scp file.txt user@server:/home/user/

ip (Network Interface and Routing Info): views and configures network interfaces.

ip a

traceroute (Trace Network Path to Host): diagnoses routing issues.

traceroute google.com

8. Package Management

apt (Debian/Ubuntu): installs, updates, and removes software packages.

sudo apt install nginx

dnf (Fedora/RHEL): installs and updates software.

sudo dnf install httpd

dpkg (Low-Level Debian Package Tool): installs .deb files manually.

sudo dpkg -i package.deb

9. Archiving and Compression

tar (Archive and Extract Files): creates .tar, .tar.gz, and .tgz archives.

tar -czvf backup.tar.gz /var/www

zip / unzip (ZIP Compression Tools): creates and extracts ZIP files.

zip logs.zip *.log
unzip logs.zip

10. Searching and Text Processing

grep (Search Text Using Patterns): finds lines that match a pattern.

grep "error" app.log

sort (Sort Lines Alphabetically or Numerically): orders text data.

sort users.txt

cut (Extract Specific Columns): splits text by a delimiter and selects fields.

cut -d ":" -f 1 /etc/passwd

awk (Advanced Text Processing and Reporting): extracts, transforms, and analyzes text.

awk '{print $1}' file.txt

sed (Stream Editor for Text Replacement): edits text in place or transforms streams.

sed 's/error/warning/g' app.log

wc (Count Lines, Words, Characters): measures text size.

wc -l file.txt

11. Helpful Shell Utilities

man (Display Manual Pages): reads the documentation for any command.

man ls

history (Show Command History): reviews previously executed commands.

history

alias (Create Custom Command Shortcuts): simplifies frequently used commands.

alias ll="ls -lh"

clear (Clear Terminal Screen): cleans up the terminal display.

clear

12. System Operation Commands

shutdown (Power Off System): turns off the machine safely.

sudo shutdown -h now

reboot (Restart System): reboots the machine.

sudo reboot

crontab (Schedule Recurring Tasks): automates commands at specific times.

crontab -e

13. Advanced File and Disk Management

ln (Create Links): creates shortcuts to files. Use -s for a symbolic (soft) link.

ln -s /var/log/syslog ~/syslog-link

stat (Display File Status): shows detailed file information such as size, permissions, and timestamps.

stat notes.txt

file (Identify File Type): tells you what kind of data a file contains, regardless of its extension.

file /bin/ls

lsblk (List Block Devices): shows disks, partitions, and where they are mounted.

lsblk

mount (Mount a Filesystem): attaches a disk or partition to a directory so you can use it. Use umount to detach it.

sudo mount /dev/sdb1 /mnt/usb

rsync (Fast File Synchronization): copies and syncs files locally or over SSH, transferring only what has changed. It is a favorite for backups.

rsync -av src/ backup/

14. Advanced Process, Job, and Log Management

journalctl (Query System Logs): reads logs collected by systemd, with filters by service and time.

journalctl -u nginx --since today

dmesg (Kernel Message Buffer): shows kernel and hardware messages, useful for diagnosing boot and driver problems.

dmesg | tail -20

lsof (List Open Files): shows which processes have files or network ports open. In Linux, almost everything is a file.

sudo lsof -i :80

nohup (Run Immune to Hangups): keeps a command running after you close the terminal or log out.

nohup ./backup.sh &

jobs / bg / fg (Manage Background Jobs): lists jobs started from your shell and moves them between background and foreground.

sleep 300 &
jobs
fg %1

nice (Set Process Priority): starts a command with a lower priority so it does not slow down other work.

nice -n 10 ./build.sh

watch (Repeat a Command): runs a command at a fixed interval and displays the output full screen.

watch -n 2 df -h

15. Advanced Networking and Security

ss (Socket Statistics): lists open ports and active connections. It is the modern replacement for netstat.

ss -tulpn

dig (DNS Lookup): queries DNS servers to troubleshoot name resolution.

dig example.com

ufw (Uncomplicated Firewall): manages firewall rules on Ubuntu and Debian systems.

sudo ufw allow 22/tcp

nc (Netcat): tests whether a specific port is open on a remote host. Be sure to allow SSH before enabling a firewall on a remote server.

nc -zv example.com 443

ssh-keygen (Generate SSH Keys): creates a key pair for secure, passwordless logins.

ssh-keygen -t ed25519

nmcli (NetworkManager CLI): views and manages network connections from the terminal.

nmcli device status

16. Advanced Text and Pipeline Tools

tee (Split Output): displays output on screen and saves it to a file at the same time.

ls -l | tee listing.txt

xargs (Build Commands from Input): takes a list from a pipe and passes it as arguments to another command.

find . -name "*.log" | xargs wc -l

diff (Compare Files): shows the differences between two files line by line.

diff old.conf new.conf

uniq (Filter Duplicate Lines): removes or counts repeated adjacent lines, so it is usually paired with sort.

sort users.txt | uniq -c

tr (Translate Characters): replaces or deletes individual characters in a stream.

echo "hello" | tr a-z A-Z

17. Users, Groups, and Environment

usermod (Modify User Account): changes an existing user, such as adding them to a group. Always use -a with -G so existing groups are kept.

sudo usermod -aG sudo alice

groupadd (Create Group): creates a new group for managing shared access.

sudo groupadd developers

su (Switch User): opens a shell as another user. The - loads that user’s full environment.

su - alice

last (Show Login History): lists recent logins, which is handy for security audits.

last -n 5

env (Display Environment Variables): prints the variables available to your current shell and its programs.

env

export (Set Environment Variable): makes a variable available to programs started from your shell.

export EDITOR=vim

which (Locate a Command): shows the full path of the program that will run when you type a command.

which python3

date (Show or Format Date and Time): prints the system date, with custom formats that are useful in scripts and backup file names.

date +%F

Where to Go From Here

You do not need to memorize all of these at once. Start with the navigation and file management commands, then add one section at a time as your work calls for it. Use man whenever you are unsure what a flag does, and practice in a virtual machine or a throwaway directory so mistakes with commands like rm cost you nothing. A few weeks of regular use is enough to make the terminal feel natural.

Leave a Reply