Essential Linux Commands Every Sysadmin Should Master
This guide compiles the most frequently used Linux commands—covering help utilities, file and directory manipulation, content processing, compression, system information, networking, disk management, permissions, user administration, and process control—to provide a comprehensive reference for effective system operation and troubleshooting.
Linux commands are the core tools for managing a Linux system, similar to DOS commands, and treat everything from CPU and memory to files and users as files.
Online Help Commands (2)
man: View command manuals and dictionaries; info offers more detailed help. help: Show help for built‑in shell commands such as cd.
File and Directory Operations (18)
ls: List directory contents and attributes. cd: Change the current working directory. cp: Copy files or directories. find: Search for files or directories. mkdir: Create a new directory. mv: Move or rename files. pwd: Print the absolute path of the current directory. rename: Rename a file. rm: Remove one or more files or directories. rmdir: Remove an empty directory. touch: Create an empty file or update timestamps. tree: Display directory contents in a tree structure. basename: Show the file name component of a path. dirname: Show the directory component of a path. chattr: Change extended file attributes. lsattr: List extended file attributes. file: Determine the file type. md5sum: Compute and verify an MD5 checksum.
File Content Handling (21)
cat: Concatenate files and output to the screen or a file. tac: Reverse the output of cat. more: Paginate file output. less: Paginate file output (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 fields. split: Divide a file into smaller pieces. paste: Merge lines from multiple files. sort: Sort text lines. uniq: Remove duplicate lines. wc: Count lines, words, or bytes. iconv: Convert file encoding. dos2unix: Convert DOS line endings to UNIX. diff: Show differences between files. vimdiff: Visual file comparison in the terminal. rev: Reverse each line of a file. grep / egrep: Filter lines matching patterns. join: Join two files on a common field. tr: Translate or delete characters.
Compression and Archiving (4)
tar: Create or extract archive files. unzip: Extract ZIP archives. gzip: Compress files using gzip. zip: Create ZIP archives.
System Information Commands (11)
uname: Show kernel and OS information. hostname: Display or set the system hostname. dmesg: Print boot messages for diagnostics. uptime: Show how long the system has been running and load. stat: Display file or filesystem status. du: Estimate disk space usage. df: Report filesystem disk space usage. top: Real‑time view of system resource usage. free: Show memory usage. date: Display or set the system date and time. cal: Show a calendar.
Network Operations (11)
telnet: Remote login using the TELNET protocol. ssh: Secure remote login via SSH. scp: Securely copy files between hosts. wget: Download files from the command line. ping: Test network connectivity. route: View or set the routing table. ifconfig: Configure network interfaces. ifup / ifdown: Bring network interfaces up or down. netstat / ss: Show network socket status. nmap: Scan networks. lsof: List open files.
Disk and Filesystem Commands (16)
mount/ umount: Mount or unmount filesystems. fsck: Check and repair filesystems. dd: Convert and copy files. dumpe2fs: Dump ext2/3/4 filesystem info. dump: Backup ext2/3/4 filesystems. fdisk / parted / partprobe: Partition disks. mkfs: Create a filesystem. e2fsck: Check ext2/3/4 filesystems. mkswap / swapon / swapoff: Manage swap space. sync: Flush buffered data to disk. resize2fs: Resize ext2/3/4 filesystems.
Permissions and Ownership (4)
chmod: Change file permissions. chown: Change file owner and group. chgrp: Change group ownership. umask: Set default permission mask.
User Management (10)
useradd, usermod, userdel: Manage user accounts. groupadd: Create a user group. passwd: Change a user password. chage: Modify password expiration. id: Show UID, GID, and groups. su, sudo: Switch user identity or execute privileged commands. visudo: Edit the sudoers file safely.
System Login Information (7)
whoami: Show the current effective username. who, w, last, lastlog, users, finger: Various ways to view logged‑in users and login history.
Process Management (15)
bg, fg, jobs: Control background and foreground jobs. kill, killall, pkill: Terminate processes. crontab: Schedule recurring tasks. ps, pstree: List processes. nice / renice: Adjust process priority. nohup: Run a command immune to hangups. pgrep, runlevel, init, service: Additional process and system control utilities.
Miscellaneous Utilities
echo, printf: Output text. rpm, yum: Package management. watch: Repeatedly run a command and display output. alias / unalias: Define or remove command aliases. date: Show or set system time. clear: Clear the terminal screen. history: View command history. eject: Eject optical media. time: Measure command execution time. nc: Netcat, a versatile networking tool. xargs: Build command lines from standard input. exec: Replace the shell with a command. export, unset: Manage environment variables. type: Determine if a command is built‑in. bc: Command‑line calculator.
Linux Cloud Computing Practice
Welcome to Linux Cloud Computing Practice. We offer high-quality articles on Linux, cloud computing, DevOps, networking and related topics. Dive in and start your Linux cloud computing journey!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
