Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the directory structure and naming conventions of Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What are the directory structure and naming conventions of Linux? in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

1. Linux directory structure diagram:

2. Linux directory structure and naming convention:

The file system of Linux follows a hierarchical structure: LSB (Linux Standard Base), that is, an inverted tree structure starting with the root "/". Please refer to the official FHS (Filesystem Hierarchy Standard) document http://www.pathname.com/fhs/.

1. / boot

Boot files are stored in this directory, and kernel files (vmlinuz) and boot loaders (bootloader, grub) are all stored in this directory, which directly affects whether the Linux system can be started normally.

2. / bin

Basic commands used by all users; programs that cannot be associated to a separate partition and will be used when OS starts

3. / sbin

Basic commands for managing classes; programs that cannot be associated to a separate partition and will be used when OS starts

4. / lib

Basic shared library files and kernel module files that the program depends on at startup (/ lib/modules)

5. / lib64

Dedicated to the location of auxiliary shared library files on x86y64 systems

6. / etc

Configuration file directory

7. / home/USERNAME

For ordinary users' home directory, for example, if you create a new yang user, the home directory is / home/yang.

8. / root

Home directory of the administrator (root user)

9. / media

A portable mobile device mount point, such as a CD or flash drive, to this directory

10. / mnt

Temporary file system mount point, the CD and flash drive mentioned above can also be mounted to this directory

11. / dev

Storage location of device files and special files, for example, the first hard disk is / dev/sda

12. / opt

Installation location of third-party applications

13. / srv

Data used by services running on the system

14. / tmp

Temporary file storage location

15. / usr

Universal shared, read-only data (universal sharing, read-only data), and there are several directories under it:

(1) / usr/bin

An application that ensures the full functionality of the system.

(2) / usr/sbin

Same as / sbin, the basic command of the management class

(3) / usr/lib

Store 32-bit library files

(4) / usr/lib64

Store 64-bit library files

(5) / usr/include

Header file of C program (header files)

(6) / usr/share

Structured independent data, such as doc, man, etc.

(7) / usr/local

The installation location of third-party applications, and there are also directories such as bin, sbin, lib, lib64, etc, share, etc.

16. / var

Variable data files (variable data file), under which there are also some directories:

(1) / var/cache

Application cache data directory

(2) / var/lib

Application status information data

(3) / var/local

Designed to store variable data for applications under / usr/local

(4) / var/lock

Lock file

(5) / var/log

Log directories and files

(6) / var/opt

Designed to store variable data for applications under / opt

(7) / var/run

Running process-related data, usually used to store process pid files

(8) / var/spool

Application data pool

(9) / var/tmp

Save the temporary data generated between two system restarts

17. / proc

Virtual file system used to output kernel and process information

18. / sys

Used to output information about hardware devices on the current system, virtual file system

19. / selinux

Storage location of security enhanced Linux,selinux-related security policies and other information

The answers to the questions about the Linux directory structure and naming conventions are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report