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

Introduction to the directory structure of linux system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Today, I will talk to you about the directory structure of the linux system, many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

The directory structure of the linux system includes: / bin directory, / boot directory, / home directory, / media directory, / mnt directory, / root directory, / tmp directory, / run directory and so on. The / bin directory holds frequently used commands, and the / root directory is the system administrator's user home directory.

Linux system directory structure

After logging in to the system, enter the command under the current command window:

Ls /

Let's take a look at each directory:

/ bin:

Bin is an acronym for Binary, and this directory holds the most frequently used commands.

/ boot:

Here are some of the core files used to start Linux, including some connection files and image files.

/ dev:

Dev is the abbreviation of Device (device). In this directory, the external devices of Linux are stored. The way of accessing devices in Linux is the same as the way of accessing files.

/ etc:

This directory is used to store all the configuration files and subdirectories needed for system management.

/ home:

The user's home directory. In Linux, each user has his own directory, which is usually named after the user's account.

/ lib:

This directory stores the system's most basic dynamic link sharing library, which works similar to the DLL file in Windows. Almost all applications need to use these shared libraries.

/ lost+found:

This directory is usually empty, and when the system shuts down illegally, some files are stored here.

/ media:

The linux system will automatically identify some devices, such as USB drives, optical drives, and so on. When identified, linux will mount the identified devices to this directory.

/ mnt:

The system provides this directory to allow users to mount other file systems temporarily. We can mount the CD-ROM drive on / mnt/, and then enter the directory to view the contents of the CD-ROM drive.

/ opt:

This is the directory where additional software is installed for the host. For example, if you install an ORACLE database, you can put it in this directory. The default is empty.

/ proc:

This directory is a virtual directory, it is a mapping of system memory, we can access this directory directly to get system information. The contents of this directory are not on the hard disk but in memory. We can also modify some files directly. For example, you can use the following command to block the ping command of the host, so that others cannot ping your machine:

Echo 1 > / proc/sys/net/ipv4/icmp_echo_ignore_all

/ root:

This directory is the system administrator, also known as the super-privileged user home directory.

/ sbin:

S means Super User, and here is the system management program used by the system administrator.

/ selinux:

This directory is unique to Redhat/CentOS, Selinux is a security mechanism, similar to windows's firewall, but this mechanism is more complex, this directory is to store selinux-related files.

/ srv:

This directory stores some data that needs to be extracted after the service is started.

/ sys:

This is a big change in the linux2.6 kernel. A new filesystem sysfs in the 2.6 kernel is installed in this directory.

The sysfs file system integrates the following three types of file system information: the proc file system for process information, the devfs file system for devices, and the devpts file system for pseudo-terminals.

The file system is an intuitive reflection of the kernel device tree.

When a kernel object is created, the corresponding files and directories are also created in the kernel object subsystem.

/ tmp:

This directory is used to store some temporary files.

/ usr:

This is a very important directory where many of your applications and files are placed, similar to the program files directory under windows.

/ usr/bin:

The application used by the system user.

/ usr/sbin:

More advanced hypervisors and system daemons used by superusers.

/ usr/src:

The default placement directory for kernel source code.

/ var:

This directory contains things that are constantly expanding, and we are used to putting directories that are often modified in this directory. Including various log files.

/ run:

Is a temporary file system that stores information since the system was started. When the system restarts, the files in this directory should be deleted or erased. If you have a / var/run directory on your system, you should make it point to run.

After reading the above, do you have any further understanding of the directory structure of the linux system? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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