Operations 16 min read

Ultimate Linux Command Cheat Sheet: Master File, Network, and System Operations

This comprehensive guide lists essential Linux commands—covering help, file and directory manipulation, content processing, compression, system information, networking, disk management, permissions, user administration, built‑in utilities, system monitoring, and process control—providing concise English descriptions for each to help users efficiently manage and troubleshoot Linux systems.

Efficient Ops
Efficient Ops
Efficient Ops
Ultimate Linux Command Cheat Sheet: Master File, Network, and System Operations

Linux Command Overview

Linux commands are the core tools for managing a Linux system, where devices, files, and processes are treated as files.

Help and Query Commands

man : View command help and manual pages.

help : Show help for built‑in shell commands.

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.

find : Search for files and directories.

mkdir : Create new directories.

rmdir : Remove empty directories.

rm : Delete files or directories.

rename : Rename files.

touch : Create an empty file or update timestamps.

tree : Display directory structure as a tree.

basename : Show the base name of a file path.

dirname : Show the directory part of a file path.

chattr : Change a file's extended attributes.

lsattr : List a file's extended attributes.

File Content Commands (21 commands)

cat : Concatenate and display file contents.

tac : Display file contents in reverse order.

more : Paginate output.

less : Paginate output with backward navigation.

head : Show the beginning of a file.

tail : Show the end of a file.

cut : Extract sections from each line of a file.

split : Split a file into smaller pieces.

paste : Merge lines of files.

sort : Sort lines of text.

uniq : Remove duplicate lines.

wc : Count lines, words, or bytes.

iconv : Convert file encoding.

dos2unix : Convert DOS line endings to UNIX.

File Compression and Archiving (4 commands)

tar : Archive files.

unzip : Extract ZIP archives.

gzip : Compress files using gzip.

zip : Create ZIP archives.

System Information Commands (11 commands)

uname : Show kernel and OS information.

hostname : Display or set the system hostname.

dmesg : Print kernel ring buffer messages.

uptime : Show system uptime and load.

stat : Display file or filesystem status.

du : Estimate file space usage.

df : Report filesystem disk space usage.

top : Real‑time view of system processes.

free : Show memory usage.

date : Display or set the system date and time.

cal : Display a calendar.

Basic Network Operations (11 commands)

telnet : Remote login using the TELNET protocol.

ssh : Secure remote login via SSH.

scp : Securely copy files between hosts.

wget : Download files from the web.

ping : Test network connectivity.

route : Show or modify the routing table.

ifconfig : Configure network interfaces.

ifup : Bring a network interface up.

ifdown : Bring a network interface down.

netstat : Display network connections and routing tables.

ss : Show socket statistics.

Advanced Network Tools (9 commands)

nmap : Network scanner.

lsof : List open files.

mail : Send and receive email.

mutt : Text‑based email client.

nslookup : Query DNS.

dig : Perform DNS lookups.

host : DNS lookup utility.

traceroute : Trace the route packets take.

tcpdump : Capture network packets.

Disk and Filesystem Commands (16 commands)

mount : Mount a filesystem.

umount : Unmount a filesystem.

fsck : Check and repair a filesystem.

dd : Convert and copy files.

dumpe2fs : Dump ext2/3/4 filesystem information.

dump : Backup ext2/3/4 filesystems.

fdisk : Partition a disk (up to 2 TB).

parted : Partition disks of any size.

mkfs : Create a filesystem.

partprobe : Inform the kernel of partition table changes.

e2fsck : Check ext2/3/4 filesystems.

mkswap : Set up a swap area.

swapon : Enable swap.

swapoff : Disable swap.

sync : Flush filesystem buffers.

resize2fs : Resize ext2/3/4 filesystems.

System Permissions and Ownership (4 commands)

chmod : Change file permissions.

chown : Change file owner and group.

chgrp : Change group ownership.

umask : Set default permission mask.

User Management (10 commands)

useradd : Add a new user.

usermod : Modify an existing user.

userdel : Delete a user.

groupadd : Add a new group.

passwd : Change a user's password.

chage : Change password expiry information.

id : Show user and group IDs.

su : Switch user identity.

visudo : Safely edit the sudoers file.

sudo : Execute a command as another user (default root).

System Login Information (7 commands)

whoami : Print the effective username.

who : Show who is logged on.

w : Display logged‑in users and their activities.

last : Show a list of last logged‑in users.

lastlog : Show the most recent login of all users.

users : List logged‑in usernames.

finger : Display user information.

Built‑in and Miscellaneous Commands (19 commands)

echo : Print arguments to standard output.

printf : Format and print data.

rpm : Manage RPM packages.

yum : High‑level package manager for RPM.

watch : Execute a program periodically, showing output fullscreen.

alias : Define or display command aliases.

unalias : Remove command aliases.

clear : Clear the terminal screen.

history : Show command history.

eject : Eject removable media.

time : Measure program execution time.

nc : Netcat – versatile networking utility.

xargs : Build and execute command lines from standard input.

exec : Replace the shell with a specified command.

export : Set environment variables.

unset : Unset shell variables or functions.

type : Indicate how a name would be interpreted if used as a command.

bc : Arbitrary‑precision calculator language.

System Management and Monitoring (9 commands)

<img src="https://mmbiz.qpic.cn/mmbiz_png/b96CibCt70iaajvl7fD4ZCicMcjhXMp1v6UXcBIdyPOYfUfaibicSXbZSrkFL9jwZRTUz8aKA1zXq1GDV8Z7uXeep6w/640?wx_fmt=png" alt=""/>

chkconfig : Manage system services at boot time.

vmstat : Report virtual memory statistics.

mpstat : Show per‑CPU statistics.

iostat : Report CPU and I/O statistics.

sar : Collect, report, or save system activity information.

ipcs : Report inter‑process communication facilities.

ipcrm : Remove IPC objects.

strace : Trace system calls and signals.

ltrace : Trace library calls.

Shutdown, Reboot, and Logout (6 commands)

shutdown : Shut down the system.

halt : Halt the system.

poweroff : Power off the machine.

logout : Exit a login shell.

exit : Exit the current shell.

Ctrl+d : Shortcut to exit the shell.

Process Management (15 commands)

bg : Resume a stopped job in the background.

fg : Bring a background job to the foreground.

jobs : List active jobs.

kill : Send a signal to a process.

killall : Kill processes by name.

pkill : Kill processes matching criteria.

crontab : Schedule recurring tasks.

ps : Report a snapshot of current processes.

pstree : Display processes as a tree.

nice/renice : Adjust process priority.

nohup : Run a command immune to hangups.

pgrep : Search for processes by name.

runlevel : Show the current system runlevel.

init : Change the system runlevel.

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

Unixbashcommand-linesystem-administration
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

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.