Fundamentals 8 min read

Master Linux Command Line Basics: From Navigation to File Management

This guide walks readers through essential Linux command line skills, covering command syntax, directory navigation, file operations, searching, content viewing, text editing with vi, and backup/restoration techniques, all illustrated with clear examples and practical tips for beginners.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Command Line Basics: From Navigation to File Management

Linux Cultivation Manual – Foundations

Chapter 1: The Awakening of the Spiritual Root – Overview of Linux Practices

凝气成符 : Understand the rune construction of Linux commands.

玄机问天 : Learn help and manual commands (help, man).

乾坤挪移 : Master file and directory manipulation (cp, rm, mv).

神识探查 : Inspect file contents (cat, grep).

时光回溯 : Master document backup and restoration (tar, gzip).

虚空造物 : Grasp the three realms of the vi editor (command, insert, last‑line mode).

Chapter 2: The Nine Foundations – Initial Command Exploration

First Level: Core Spell (Linux Command Classification)

内门心法(内部命令) : Built‑in shell commands like pwd, cd, natural as breathing.

外门神通(外部命令) : External binaries in /bin, /usr/bin such as ls and vim.

Second Level: Rune Sealing (Command Syntax)

Spell: command [options] [arguments] 命符核心(命令字) : The command name, e.g., ls, cp, must be exact.

灵纹加持(选项) : Short options like -l or long options like --help.

祭品献阵(参数) : Specify targets, e.g., /home/仙府.

Secret Techniques

Tab

: Auto‑completion. Ctrl+C: Interrupt the current command. Ctrl+L: Clear the terminal.

Chapter 3: The Realm of Heaven – Directory and File Practice

First Realm: Observing the Sky (Viewing Directories)

pwd

: Show current directory. cd: Change directory instantly.

Absolute paths start from /, e.g., /灵山/藏经阁. Relative paths use the current location, e.g., ../丹药房. ls -l: List files with permissions, size, timestamps. du -sh: Show directory size.

Second Realm: Creation Art (Creating Directories and Files)

mkdir -p /秘境/灵泉/药田

: Create nested directories. touch: Create an empty file. ln -s 灵剑 -> 上古神兵: Create a symbolic link.

Third Realm: Great Translocation (Copy, Delete, Move)

cp -r

: Recursively copy directories. rm -rf: Force delete (use with caution). mv: Rename or move files.

Fourth Realm: Divine Insight (Search Commands)

which

: Locate command path, e.g., which ls/usr/bin/ls. find /灵库 -name "*.秘籍" -size +10M: Find files matching criteria.

Chapter 4: The Record of Heaven – File Content Comprehension

Skill One: External Vision (Viewing Files)

cat

: Display small files. more/less: Paginated view, press q to quit. head -n 5: Show first five lines. tail -f: Follow file updates in real time.

Skill Two: Refining Spirit (Statistics and Search)

wc -l /仙籍/弟子名册

: Count lines. grep "灵石": Filter lines containing “灵石”; use -v to invert.

Chapter 5: Time – Backup and Restoration

Temporal Magic (tar + gzip/bzip2)

Compress archive: tar -zcvf 灵库备份.tar.gz /灵库 (gzip) or tar -jcvf 丹方备份.tar.bz2 /丹房 (bzip2).

Extract archive: tar -zxvf 灵库备份.tar.gz -C /新洞天.

Chapter 6: Void Creation – vi Editor Three‑Realm Method

Three Realms (Modes)

Command mode (default): dd delete line, yy yank line, p paste, /天道 search.

Insert mode (press i to enter): type freely, Esc return to command mode.

Last‑line mode (press : to enter): :wq write and quit, :%s/旧咒/新咒/g replace throughout.

Chapter 7: Ascension Insights

Linux practice rewards diligent command usage and manual consultation ( man, --help). Mastering vi becomes a forge for countless configurations, enabling you to manage servers, establish your own domain, and achieve operational mastery.

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.

Shellcommand-lineBackupfile managementvi editor
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.