Operations 12 min read

Master Essential Linux Commands for System Operations

This comprehensive guide introduces the most frequently used Linux commands, covering directory navigation, file manipulation, permission management, searching, compression, system shutdown, and network utilities, providing clear syntax examples and explanations to help users efficiently manage and troubleshoot Linux systems.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Essential Linux Commands for System Operations

Common Directory Commands

ls – list directory contents. Examples: ls (current directory), ls -l (long format), ls -a (include hidden files), ls -h (human‑readable sizes).

cd – change directory. Examples: cd /usr/local/src, cd ~ (home), cd - (previous), cd .. (parent).

pwd – print working directory.

Common Directories

/ – root, /bin – user‑readable commands, /boot – boot files, /dev – device files, /etc – configuration, /home – user homes, /lib – libraries, /mnt – mount points, /media – removable media, /root – root home, /tmp – temporary files, /sbin – system commands, /proc – kernel info, /sys – system info, /usr – software, /var – variable data (logs, mail, lib).

File Operations Commands

mkdir – create directories. mkdir test, mkdir -p test1/test2/test3.

rmdir – remove empty directories.

touch – create empty file or update timestamps. touch test.py.

rm – remove files or directories. rm file, rm -r dir, rm -f file, rm -rf dir.

cp – copy files or directories. cp src dest, cp -r src dest, cp -p src dest, cp -a src dest.

mv – move or rename. mv src dest, mv file /tmp/, mv file newname.

cat – display file contents. cat file, cat -n file.

more – paginate output. Use space to scroll, b to go back, q to quit.

head – show beginning of a file. head file, head -n 20 file, head -n -20 file.

ln – create links. ln -s source target creates a symbolic link.

Permission Management

File permissions are displayed as ten characters (e.g., -rw-r--r--). The first character indicates type ( - file, d directory, l link). The next nine bits represent user (u), group (g), and others (o) permissions: read (r=4), write (w=2), execute (x=1).

chmod – change mode. Symbolic: chmod u+x file, chmod g+w,o+w file, chmod u=rwx file. Numeric: chmod 755 file, chmod 644 file.

chown – change ownership. chown user file, chown user:group file.

Help Commands

man – view manual pages.

--help – display command‑specific help.

Search Commands

whereis – locate binary, source, and manual files.

find – search files. Common options: -name, -user, -group, -size, -type, -perm, -iname.

grep – search for patterns. Example: grep -i "root" /etc/passwd. Use -v to invert, -i to ignore case, and pipe ( |) to combine commands.

Compression and Decompression

Common formats: .gz, .bz2. Examples: tar -zcvf archive.tar.gz files – create gzipped tarball. tar -zxf archive.tar.gz – extract. tar -jcvf archive.tar.bz2 files – create bzip2 tarball. tar -jxf archive.tar.bz2 – extract.

Use -t to list contents without extracting.

Shutdown and Reboot Commands

shutdown – power off or reboot. shutdown -h now (halt), shutdown -r now (reboot).

reboot – immediate reboot.

Network Commands

ping – test connectivity. ping -c 4 8.8.8.8.

ifconfig – display or configure network interfaces (requires root).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxcommand-linefile management
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

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.