YouTip LogoYouTip

Linux System Contents

# Linux System Directory Structure After logging into the system, enter the following command in the current command window: ls / You will see the following output: !(#) Tree directory structure: !(#) !(#) The following is an explanation of these directories: | Directory | Detailed Function | Common Files / Examples | | --- | --- | --- | | `/` | Root file system, the starting point for all mount points and paths. Contains essential subdirectories and entry structures for the system. | No specific data files, only subdirectory structure. | | `/bin` | Essential basic commands required for system startup and single-user mode, executable by all users. | `ls`, `cp`, `mv`, `rm`, `bash` | | `/sbin` | System administration and maintenance commands, intended for root. | `fsck`, `reboot`, `shutdown` | | `/usr` | Main collection of user-level programs and libraries, containing most system software, documentation, and tools. | `/usr/bin`, `/usr/lib`, `/usr/share` | | `/usr/bin` | Main directory for regular user programs. | `python3`, `vim`, `git` | | `/usr/sbin` | Extended collection of administrative tools. | `useradd`, `apache2ctl` | | `/usr/lib` | Dynamic libraries and modules required by programs within `/usr`. | Various `.so` dynamic libraries | | `/usr/local` | Independent area for locally installed or compiled software. | `/usr/local/bin`, `/usr/local/lib` | | `/lib` or `/lib64` | Location of core libraries for system startup and the dynamic linker. | `libc.so.6`, `ld-linux.so` | | `/etc` | System-level configuration center, storing all service and system configurations uniformly. | `passwd`, `group`, `fstab`, `ssh/sshd_config` | | `/home` | Collection of personal home directories for regular users. | `/home/user/.bashrc`, `/home/user/Documents` | | `/root` | Home directory for the root user. | `/root/.ssh/` | | `/var` | Frequently changing data: logs, caches, database runtime files, etc. | `/var/log`, `/var/lib`, `/var/cache` | | `/var/log` | Central location for all system and service logs. | `syslog`, `auth.log`, `kern.log` | | `/var/cache` | Application and package manager caches. | `/var/cache/apt/` | | `/var/lib` | Persistent state data for services. | `mysql/`, `docker/` | | `/tmp` | Temporary file area for program runtime, can be cleaned at any time. | Temporary files, socket paths | | `/boot` | Files required for booting: kernel, initramfs, boot configuration. | `vmlinuz-*`, `initrd.img`, `grub/grub.cfg` | | `/dev` | Collection of device nodes, where files represent devices. | `/dev/sda`, `/dev/null`, `/dev/tty0` | | `/proc` | Virtual file system provided by the kernel, displaying real-time information about the system and processes. | `/proc/cpuinfo`, `/proc//` | | `/sys` | Status interface for devices, drivers, and kernel subsystems. | `/sys/class/net/`, `/sys/block/` | | `/mnt` | Manual temporary mount points. | `/mnt/usb` | | `/media` | Default location for automatically mounted external devices. | `/media/user/USB_DRIVE` | | `/run` | Storage point for runtime data, cleared after reboot. | `*.pid`, runtime status socket files | In Linux, the following directories are critical system areas; accidental deletion or improper modification will directly disrupt system operation: **/etc β€” System Configuration Core** All critical configurations are centralized here. Any incorrect modification may cause services to fail or even prevent the system from booting. **/bin, /sbin, /usr/bin, /usr/sbin β€” System Command Area** Location of pre-installed system commands. * **/bin, /usr/bin**: Basic commands for regular users (e.g., `ls` is located at `/bin/ls`). * **/sbin, /usr/sbin**: System administration commands, primarily used by root. **/var β€” Dynamic Data Area** Data continuously written during system runtime is stored here. The key is **/var/log**, where all service logs are stored; mail, caches, queues, and other content are also maintained under this directory. * * *
← Linux Forget PasswordLinux System Boot β†’