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 contents of the file directory in the Linux system

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what is the content of the file directory in the Linux system". In the daily operation, I believe that many people have doubts about the content of the file directory in the Linux system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the question of "what is the content of the file directory in the Linux system?" Next, please follow the editor to study!

The directory structure and main contents "/" root directory section has the following subdirectories:

The ◆ / usr directory contains all commands, libraries, documentation, and other files. These files will not be changed in normal operation. This directory also contains the main applications of your Linux distribution, such as Netscape.

The ◆ / var directory contains files that have been changed during normal operation: spooled files, record files, locked files, temporary files, page format files, and so on.

The ◆ / home directory contains the user's files: parameter settings files, personalization files, documents, data, EMAIL, cache data, and so on. This directory should be retained when the system is provincial.

The ◆ / proc directory contains the whole illusory file. They don't actually exist on disk, nor do they take up any space. (their size can be displayed with ls-l.) when viewing these files, you are actually accessing the information that exists in memory, which is used to access the system.

◆ / bin system startup required execution files (binary), these files can be used by ordinary users.

◆ / sbin system execution files (binary), which are not intended for use by ordinary users. (ordinary users can still use them, but specify directories. )

The configuration file directory of the ◆ / etc operating system.

The Home directory of the ◆ / root system administrator (also known as superuser or root).

◆ / dev device file directory. Devices under LINUX are treated as files, so the hardware is abstracted to facilitate reading and writing, network sharing, and temporary loading into the file system. Normally, the device has a separate subdirectory. The contents of these devices appear in separate subdirectories. LINUX doesn't have a driver.

A shared library of programs and core modules in the ◆ / lib root file system directory.

Files used by ◆ / boot for bootstrap loaders (LILO or GRUB). When the computer starts (if there are multiple operating systems, it may allow you to choose which operating system to start), these files are loaded first. This directory will also contain the LINUX core (zip file vmlinuz), but the LINUX core can also exist elsewhere, as long as LILO is configured and LILO knows where the LINUX core is.

◆ / opt optional applications, such as KDE under REDHAT 5.2 (under REDHAT 6.0, KDE is placed in other XWINDOWS applications, and the main executor is in the / usr/bin directory)

◆ / tmp temporary file. The directory will be cleaned up automatically.

Files restored by ◆ / lost+found when the file system is repaired

The more important parts of the ◆ / usr directory are:

◆ / usr/X11R6 X-WINDOWS system (version 11, release 6)

◆ / usr/X11 and / usr/X11R6 (symbolic connection of / usr/X11R6)

◆ / usr/X11R6/bin a large number of small X-WINDOWS applications (or symbolic links to large execution files in other subdirectories).

Documentation for ◆ / usr/doc LINUX (on newer systems, this directory is moved to / usr/share/doc).

◆ / usr/share is independent of your computer-structured data, such as words in dictionaries.

◆ / usr/bin and / usr/sbin are similar to the corresponding directories under the "/" root directory (/ bin and / sbin), but are not used for basic startup (for example, in emergency maintenance). Most of the commands are in this directory.

Applications installed by the local administrator of ◆ / usr/local (or there may be separate subdirectories for each application). This directory may be empty after "main" installation. The contents of this directory should exist after reinstalling or upgrading the operating system.

◆ / usr/local/bin may be a small application installed by the user, with symbolic connections to some large applications in the / usr/local directory.

Contents of the ◆ / proc directory:

◆ / proc/cpuinfo information about the processor, such as type, manufacturer, model, performance, etc.

◆ / proc/devices is currently running a list of all devices configured by the kernel.

The DMA channel that ◆ / proc/dma is currently using. / proc/filesystems is currently running the file system configured by the kernel.

The interrupts that ◆ / proc/interrupts is using, and how many interrupts there have been.

The ◆ O port currently in use by ◆ / proc/ioports.

For example, use the following command to read the CPU information of the system.

Cat / proc/cpuinfo

/ bin

Bin is the abbreviation of binary. This directory follows the structure of the UNIX system and stores the commands that users use most frequently. Such as cp, ls, cat, and so on.

/ boot

Here are some of the core files used to start Linux.

/ dev

Dev is the abbreviation of device (device). In this directory are all Linux peripherals, which function similar to .sys under DOS and .vxd under Win. In Linux, devices and files are accessed in the same way. For example: / dev/hda represents * physical IDE hard drives.

/ etc

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

/ home

The user's home directory, for example, if there is a user named wang, then his home directory is / home/wang can also be represented by ~ wang.

/ lib

This directory stores the system's most basic dynamic link sharing libraries, which are similar to .dll files in Windows. Almost all applications need to use these shared libraries.

/ lost+found

This directory is usually empty, and when the system shuts down abnormally, it becomes a refuge for homeless files. By the way, it's kind of similar to the .chk file under DOS.

/ mnt

This directory is empty, and the system provides this directory for users to mount other file systems temporarily.

/ proc

This directory is a virtual directory, it is a mapping of system memory, we can access this directory directly to get system information. In other words, the contents of this directory are not on the hard drive but in memory.

/ root

The home directory of the system administrator (also known as superuser). As the owner of the system, there must be some privileges. For example, have a separate directory.

/ sbin

S means Super User, which means that what is stored here is the management program used by the system administrator.

/ tmp

Needless to say, this directory must be used to store some temporary files.

/ usr

This is the largest directory, where almost all the applications and files we need are stored. It contains the following subdirectories

/ usr/X11R6

Directory where X-Window is stored

/ usr/bin

Many applications are stored

/ usr/sbin

Some of the management programs for superusers are put here.

/ usr/doc

This is the home of Linux documents.

/ usr/include

The header files needed to develop and compile applications under Linux are found here.

/ usr/lib

Store some commonly used dynamic link shared libraries and static archives

/ usr/local

This is the / usr directory for ordinary users, where it is most appropriate to install software

/ usr/man

Man is synonymous with help in Linux. Here is the directory where the help documents are stored.

/ usr/src

Linux open source code exists in this directory, fans do not let go!

/ var

This directory contains things that are constantly expanding, and in order to keep / usr relatively stable, directories that are often modified can be placed in this directory, as many system administrators actually do. By the way, the log files for the system are in the / var/log directory.

At this point, the study on "what is the content of the file directory in the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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