Master Linux Basics: Directory Structure, Common Commands, and Vim Tips
This guide introduces Linux's directory hierarchy, essential command-line operations, file permission handling, compression utilities, useful shortcuts, and Vim editing techniques, providing a comprehensive foundation for developers and system administrators working with Unix-like environments.
1. Linux Directory Structure
Linux, the most widely used server operating system, is based on Unix, open‑source and free. Its stability and security give it a dominant market share, making it the preferred environment for running programs and for devices such as phones and routers.
bin – binaries: executable programs for all users.
sbin – super‑user binaries: executables reserved for the root account.
etc – configuration files for the system.
usr – shared system resources and application files.
home – root directory for user files.
root – home directory of the super‑user.
dev – device files representing hardware.
lib – shared libraries and kernel modules required by programs.
mnt – mount points for temporary file‑system attachments.
boot – files needed for system booting.
tmp – temporary files.
var – variable data such as logs and databases.
2. Common Linux Commands
2.1 File and Directory Operations
Command syntax follows the pattern command -options arguments. Options and arguments may be omitted. Example:
ls -la /usr2.2 System Commands
2.3 Compression and Decompression
2.4 File Permission Operations
Linux file permissions are expressed as a ten‑character string, e.g., -rw-r--r-- or numerically as 644. The first character indicates the file type ( d for directory, - for regular file, l for symbolic link). The next three groups of three characters represent permissions for the owner (user), group, and others respectively, using r (read), w (write), and x (execute). The symbolic letters u, g, o, and a can be used with chmod to modify these bits.
r – read permission.
w – write permission.
x – execute permission (binary 111 = 7, 110 = 6, 100 = 4).
First position: file type ( d directory, - regular file, l link).
Positions 2‑4: owner permissions ( u).
Positions 5‑7: group permissions ( g).
Positions 8‑10: others permissions ( o).
Positions 2‑10 collectively can be addressed as a (all).
3. Linux Keyboard Shortcuts and Symbolic Commands
4. Vim Editor
Vim (or vi) is the most widely used text editor on Linux, operating entirely via keyboard commands without a graphical menu. The following sections illustrate its modes and common commands.
4.1 Editing Text
4.2 Navigation Commands
4.3 Replace and Cancel Commands
4.4 Delete Commands
4.5 Common Shortcuts
This material provides a practical reference for beginners and intermediate users who need to navigate Linux systems, execute routine commands, manage file permissions, and edit files efficiently with Vim.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
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.
