Fundamentals 5 min read

Master Linux Basics: Directory Structure, Essential Commands, and Vim Tips

This guide introduces Linux as a stable, open‑source server OS, explains its hierarchical directory layout, covers common command‑line operations, file permission concepts, useful shortcuts, and provides a concise overview of the powerful Vim editor for efficient text editing.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Master Linux Basics: Directory Structure, Essential Commands, and Vim Tips

Linux is the most widely used server operating system, based on Unix, open‑source and free. Its stability and security give it a high market share, making it an ideal environment for running program code. Linux can run programs for long periods and be installed on various hardware such as phones and routers; Android’s lowest layer runs on Linux.

1. Linux Directory Structure

bin (binaries) – stores binary executable files

sbin (super user binaries) – stores binaries accessible only by root

etc (etcetera) – stores system configuration files

usr (unix shared resources) – stores shared system resources

home – root directory for user files

root – super‑user home directory

dev (devices) – stores device files

lib (library) – stores shared libraries and kernel modules

mnt (mount) – mount points for temporary file systems

boot – files used during system boot

tmp (temporary) – temporary files

var (variable) – files that change at runtime

2. Common Linux Commands

Command format: command -options arguments (options and arguments may be omitted).

<code>ls -la /usr</code>

2.1 File and Directory Operations

2.2 System Commands

2.3 Compression and Decompression

2.4 File Permission Operations

Linux file permission notation explains the type and access rights:

r – read, w – write, x – execute (binary 111, 110, 100 → e.g., 764)

First character: file type (d for directory, - for regular file, l for link)

Positions 2‑4: user (owner) permissions, denoted by u

Positions 5‑7: group permissions, denoted by g

Positions 8‑10: other users permissions, denoted by o

Positions 2‑10 can be represented collectively as a (all)

3. Linux Shortcut Keys and Symbolic Commands

4. Vim Editor

vi/vim is the most commonly used text editor on Linux and is extremely powerful. It operates entirely via commands without menus.

4.1 Editing Text

4.2 Navigation Commands

4.3 Replace and Undo Commands

4.4 Delete Commands

4.5 Common Shortcut Keys

LinuxDirectory StructureCommand LineVimSystem AdministrationFile Permissions
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

login 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.