Fundamentals 15 min read

150 Essential Linux Commands Every User Should Know

This article presents a comprehensive reference of 150 Linux commands, covering file and directory operations, content manipulation, system information, network utilities, user and permission management, disk and filesystem tools, built‑in shell commands, and process control, each with concise descriptions to help users master Linux system administration.

Linux Tech Enthusiast
Linux Tech Enthusiast
Linux Tech Enthusiast
150 Essential Linux Commands Every User Should Know

Overview

Linux commands are the core tools for managing a Linux system. The article organizes the commands into logical groups and provides a brief description of each command’s purpose.

File and Directory Operations (18 commands)

ls – List directory contents and attributes.

cd – Change the current working directory.

cp – Copy files or directories.

mv – Move or rename files.

mkdir – Create a new directory.

rm – Remove one or more files or directories.

rmdir – Remove empty directories.

touch – Create an empty file or update timestamps.

tree – Display directory contents in a tree structure.

basename – Show the file name or directory name.

dirname – Show the path of a file or directory.

chattr – Change a file’s extended attributes.

lsattr – List a file’s extended attributes.

File and Content Processing (21 commands)

cat – Concatenate files and output to the screen or a file.

tac – Reverse the output of cat.

more – Paginated display of file content.

less – Paginated display (inverse of more).

head – Show the beginning of a file.

tail – Show the end of a file.

cut – Split lines by a delimiter and output selected fields.

split – Split a file into smaller pieces.

paste – Merge lines from multiple files.

sort – Sort text data in a file.

uniq – Remove duplicate lines.

wc – Count lines, words, or bytes.

iconv – Convert file encoding.

dos2unix – Convert DOS line endings to UNIX.

diff – Compare differences between files.

vimdiff – Visual file comparison using Vim.

System Information Commands (11 commands)

uname – Show operating‑system information.

hostname – Display or set the system’s host name.

dmesg – Show kernel boot messages for troubleshooting.

uptime – Display system uptime and load average.

stat – Show file or filesystem status.

df – Report filesystem disk‑space usage.

du – Estimate disk space used by files.

top – Real‑time view of system resource usage.

free – Display memory usage.

date – Show or set the system date and time.

cal – Display a calendar.

Search and Locate Commands (4 commands)

which – Locate a binary in the PATH.

find – Search for files or directories by traversing the filesystem.

whereis – Locate binaries, sources, and manuals.

locate – Search a pre‑built database for file names.

Basic Network Operations (11 commands)

telnet – Remote login using the TELNET protocol.

ssh – Secure remote login using SSH.

scp – Securely copy files between hosts.

wget – Download files from the command line.

ping – Test network connectivity between hosts.

route – View or modify the routing table.

ifconfig – View and configure network interfaces.

ifup – Bring a network interface up.

ifdown – Bring a network interface down.

netstat – Show network status.

ss – Display socket statistics.

Advanced Network Operations (9 commands)

nmap – Network scanning.

lsof – List open files.

nc – Powerful networking utility (netcat).

Disk and Filesystem Commands (16 commands)

mount – Mount a filesystem.

umount – Unmount a filesystem.

fsck – Check and repair filesystems.

dd – Convert and copy files.

dumpe2fs – Dump ext2/3/4 filesystem information.

dump – Backup ext2/3/4 filesystems.

fdisk – Partition disks (up to 2 TB).

parted – Partition disks without size limits.

mkfs – Create a filesystem.

partprobe – Inform the kernel of partition table changes.

e2fsck – Check ext2/3/4 filesystems.

mkswap – Create a swap partition.

swapon – Enable swap.

swapoff – Disable swap.

sync – Flush buffered data to disk.

resize2fs – Resize ext2/3/4 filesystems.

System Permissions and User Management (4 commands)

chmod – Change file or directory permissions.

chown – Change file owner and group.

chgrp – Change group ownership.

umask – Set default permission mask.

User Login Information (7 commands)

whoami – Show the effective username.

who – List currently logged‑in users.

w – Show logged‑in users and their activities.

last – Display recent login sessions.

lastlog – Show the most recent login of all users.

users – List usernames of users currently logged in.

finger – Retrieve detailed user information.

Built‑in and Miscellaneous Commands (19 commands)

echo – Print variables or strings.

printf – Formatted output.

rpm – Manage RPM packages.

yum – Simplified RPM package management.

watch – Periodically execute a command and display output.

alias – Define command aliases.

unalias – Remove command aliases.

date – Show or set system date/time.

clear – Clear the terminal screen.

history – Show command history.

eject – Eject optical media.

time – Measure execution time of a command.

xargs – Build and execute command lines from standard input.

exec – Replace the shell with a specified command.

export – Set or display environment variables.

unset – Remove variables or functions.

type – Determine if a command is built‑in.

bc – Command‑line calculator.

System Management and Performance Monitoring (9 commands)

chkconfig – Manage system startup services.

vmstat – Virtual memory statistics.

mpstat – CPU statistics per processor.

iostat – I/O statistics.

sar – Collect and report system activity.

ipcs – Report inter‑process communication facilities.

ipcrm – Remove IPC objects.

strace – Trace system calls and signals.

ltrace – Trace library calls.

Process Management (15 commands)

bg – Resume a suspended job in the background.

fg – Bring a background job to the foreground.

jobs – List current jobs.

kill – Send a signal to terminate a process.

killall – Kill processes by name.

pkill – Kill processes matching a pattern.

crontab – Schedule recurring tasks.

ps – Snapshot of current processes.

pstree – Tree view of processes.

nice/renice – Adjust process priority.

nohup – Run a command immune to hangup signals.

pgrep – Find processes matching criteria.

runlevel – Show current runlevel.

init – Change the system runlevel.

service – Start, stop, restart, or query system services.

Shutdown and Reboot Commands (6 commands)

shutdown – Shut down the system.

halt – Halt the system.

poweroff – Power off the system.

logout – Log out of the current shell.

exit – Exit the current shell.

Ctrl+d – Shortcut to exit the shell.

By reviewing this list, users can quickly locate the appropriate command for a given task and gain a solid foundation for everyday Linux system administration.

sysadmincommand-linelinux-commands
Linux Tech Enthusiast
Written by

Linux Tech Enthusiast

Focused on sharing practical Linux technology content, covering Linux fundamentals, applications, tools, as well as databases, operating systems, network security, and other technical knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.