Directory in Linux

xiaoxiao2021-03-06  205

Directory Structure

----

/

This is the root directory. In Windows, DOS or other similar operating systems, each partition has a corresponding root directory. But Linux and other UNIX systems put all the files in a directory tree, / is the only root directory. Generally speaking, what files are rarely saved below the root directory, or only one kernel image is here.

/ boot

Many Linux systems placed the kernel image and other files related to the launch here.

/ TMP

The temporary document that is typically generated when it is started. Our own temporary files are put on / var / tmp.

/ MNT

This directory is placed in some subdirects used to mount other devices, such as / mnt / cdrom or / mnt / floppy. In some Linux, this directory is replaced by / mount.

/ lib

The library file that needs to be used is placed in this directory. Those non-starting library files will be placed under / usr / lib. The kernel module is placed under the / lib / modules / (kernel version).

/ proc

This directory is actually absent on the disk. The files inside are about current system status, including running processes, hardware status, how much memory is used ... Most of them are giving computers.

/ dev

All device files are saved in this directory. There are some Linux kernel created for special files to control hardware devices. Note that the NIC device file (Eth0, PPP0, etc.) is not here.

/ var

There are some data that are changed by the system. For example, / var / tmp is used to store temporary files. There are many other processes and modules to put their record files in this place. Here, some important subdirectory will be listed:

/ VAR / LOG

There are most recorded files here. As time grows, this catalog may become very bloated. So you need regularly to clean it.

/ VAR / RUN

Includes small information at various runtime.

/ VAR / LIB

Includes some files that are required to run. If you use your notebook, / var / lib / pcmcia / stab may be useful to you.

/ var / spot

Mail, news, the location of the print sequence.

/ root

Root user's home directory. Just like the old uncle in the school tube dormitory.

/ home

The general user's main directory will be placed in this directory. Just like the various rooms in the school dormitory. Under Linux, you can enter your own home directory through $ CD ~.

/ ETC

If you are a root user, this directory should be your most frequent place. There are most system configuration files here. Relatively speaking, a single user's system profile will be saved in this user's own home directory. The files here will increase or decrease depending on the software you install. The following will be listed in the important subdirectory:

/ ETC / X11

The profile required for the X system is placed here. XF86Config is to store the configuration to this place. / etc / x11 / fonts places some of the fonts required for some servers. There are also some of the profiles stored by the window manager to be placed in this place.

/etc/init.d

For Debian, this directory saves the launch description file, including loading descriptions of various modules and services. So if you don't know, it is best not to delete this thing casually. The files here are configured by the system, not the user itself to be configured.

/etc/rcs.d

There are some connection files connected to /etc/init.d, and the corresponding description is performed according to the difference of Runlevel. The filename here is started by S, then a two digits - represents the order of various service boots. For example, S24foo is performed in front of S42BAR. Then it is the name of the file below /etc/init.d below.

/etc/rc0.d - /etc/rc6.d

This is also some connection files, and /etc/rcs.d is similar. Different, these will only run the corresponding description under the specified Runlevel. 0 indicates that the shutdown is turned off, and 6 is represented. All files starting with K are turned off, and all files starting with S are restarted. At present, the name of the file is the same as /etc/rcs.d. Note that under Debian, 2 is started. / bin, / sbin

The ordinary procedures and system programs needed when they are started here. Many programs are also useful after startup, they are placed in this directory because they often be called by other programs.

/ usr

This is a very large directory, almost all documents are placed here, except those mentioned above. Here, some important subdirectory will be listed:

/ usr / x11r6, / usr / x11, / usr / xfree86

This saves the files needed by the X system, which is the same as the directory structure and / usr.

/ usr / bin

Binary executables stored in the directory where most applications are placed here.

/ usr / sbin

There are most of the system programs here.

/ usr / games

Game programs and corresponding data will be placed here.

/ usr / include

This directory holds the header file of C and C . Unless you are a programmer, you may not be interested.

/ usr / lib

The library file that cannot be used when starting will be placed here.

/ USR / INFO

The data required for the GNU INFO program is saved here.

/ usr / man

The data required for the Man program is saved here.

/ USR / SRC

The source code file is saved here. The source code of the Linux kernel is placed under / usr / src / linux.

/ usr / doc

A variety of document files are saved here. These files can help you understand Linux, solve problems and provide some tips. Or you can access

Http://www.linuxdoc.org is a lot of knowledge.

/ usr / local

This saves the files needed for local computers. Special meaning when users perform remote access. This catalog is a separate partition under some Linux system, which stores files for the user belonging to this machine. The structure and / usr in it are the same.

/ usr / shared, / usr / share

There are all kinds of shared files, such as the sound files required for an application.

Reference command

----

LS - listing directory and files

CD - enter a directory

转载请注明原文地址:https://www.9cbs.com/read-128723.html

New Post(0)