[Common Catalogue Description]

directory

/bin

Store binary executable files (ls,cat,mkdir, etc.), common commands are generally here.

/etc

Stores system management and configuration files

/home

The root directory for storing all user files is the base point of the user’s home directory. For example, the home directory of the user is /home/user, which can be expressed as ~user

/usr

Important directory /usr/local Installation directory of the local system administrator software (for installing system-level applications). This is the largest directory and contains almost all the applications and files you need.

/usr/x11r6 Specifies the directory where x Windows is stored

/usr/bin Numerous applications

Some hypervisors for /usr/sbin superuser

The/usr/doc Linux documentation

/usr/include A header file used to develop and compile applications in Linux

/usr/lib Common dynamic link libraries and software package configuration files

/usr/man help document

The /usr/src source code for the Linux kernel is in /usr/src/linux

/usr/local/bin Indicates the command added locally

/usr/local/lib Specifies the local library

/opt

The location where the optional application package for additional installation is placed. Normally, we can install Tomcat and so on here.

/proc

A virtual file system directory is a mapping of system memory. You can access this directory directly to obtain system information.

/root

Home directory for superuser (system administrator) (privileged class ^ O ^)

/sbin

Store binary executable files accessible only by root. The system commands and programs used by system administrators are stored here. Such as ifconfig.

/dev

Used to store device files.

/mnt

This directory is provided by the system to allow users to temporarily mount other file systems.

/boot

Store various files used for system boot

/lib

Store shared libraries and kernel modules needed to run programs in the file system. A shared library, also called a dynamic link shared library, functions like a. DLL file in Windows and stores shared files required by the root file system program.

/tmp

It is a common storage point for temporary files.

/var

It is used to store files that need to change data at run time, and it is also an overflow area for some large files, such as log files for various services (system startup logs, etc.). And so on.

/lost+found

This directory is usually empty, the system abnormally shut down, leaving the “homeless” file (called.chk under Windows) here

Linux directories are very different from Windows directories. Linux directories are like a tree, with the top layer being the root directory, as shown below:

/bin Indicates the binary executable command

/dev device special file /etc system management and configuration file /etc/rc.d Startup configuration file and script /home The base point of the home directory of the user. For example, the home directory of the user is /home/user. Also called dynamic link shared library, function similar to Windows. DLL file /sbin super management command, / TMP common temporary file storage point /root Main directory for system administrators/MNT The system provides this directory for users to mount other file systems temporarily. / Lost +found This directory is usually empty. The “homeless” file (or.chk in Windows) left by an abnormal shutdown is in this /proc virtual directory, which is a mapping of system memory. You can access this directory directly to obtain system information. /usr is the largest directory that contains almost all applications and files that need to be used.

/usr/x11r6 X Window directory /usr/bin Many applications /usr/sbin some management programs for super users /usr/doc Linux documents /usr/include Linux Header files required for developing and compiling applications /usr/lib configuration files of common dynamic link libraries and software packages /usr/man help documents /usr/src source code, The source code for the Linux kernel is stored in /usr/src/linux. /usr/local/bin Locally added command /usr/local/lib Locally added library root file system

In general, the space taken up by the root file system should be small because most of the files in it do not need to be changed very often, and both strict files and a small, infrequently changed file system are not susceptible to corruption. The root directory generally does not contain any files, except perhaps for a standard system boot image called/vmlinuz. All other files are in subdirectories of the root file system.

  1. The /bin directory /b I n directory contains commands required for boot or commands that ordinary users might use (possibly after boot). These commands are executable programs of binary files (b I N is short for B I N A R Y – – binary), most of which are important system files in the system.
  2. The /sbin directory /sb I n directory is similar to /bin and is used to store binary files. Because most of these files are basic system programs used by system administrators, they are generally not used by ordinary users, although they can be used when necessary and allowed.
  3. The /etc directory /etc directory stores various system configuration files, including user information files /etc/p a s S W d and system initialization files /et C/r c. L I n u x It is these files that make them work properly.
  4. /root directory /root directory is the directory of the superuser.
  5. The /lib /lib directory is a shared library for programs running on the root file system. These files contain code that can be shared by many programs to avoid each program containing a copy of the same subroutine, thus making the executable file smaller and saving space.
  6. The /lib/modules directory contains modules that can be loaded from the system core, especially those needed to reboot the system when recovering from a broken system (such as network and file system drivers).
  7. The /dev /dev directory stores device files, that is, device drivers. Users access external devices through these files. For example, users can access mouse input by accessing/d e v/m o u s e, just like any other file.
  8. / TMP directory/TMP directory stores information and data generated when the program is running. However, after boot, it is better to run programs using/v a r /tmp instead of/TMP, since the former may have a larger disk space.
  9. The /boot /boot directory houses files used by the Bootstrap loader, such as L I LO, and the core image is often placed here instead of in the root directory. But if there are many core images, the directory can become large, and a separate file system is better. It is also important to ensure that the core image must be within the first 10, 24 cylinders of the DISK.
  10. The/MNT directory /mnt directory is the installation point of the system administrator temporary installation (M O u n T) file system. The program does not automatically support installation into/MNT. / MNT can be divided into many subdirectories. For example, / MNT /dosa may be a floppy drive using m s dos file system, while/MNT /exta may be a floppy drive using E xt 2 file system, / MNT /cdrom cd-rom drive, and so on.
  11. /proc, /usr,/var,/home directories Installation points for other file systems.

Details below;

/etc/file system

The /etc directory contains various system configuration files, some of which are described below. Others you should know which program they belong to and read the program’s pages. Many network configuration files are also in /etc.

  1. /etc/rc or /etc/rc.d or /etc/rc? .d Starts or changes the script or directory in which the script is run at the runlevel.
  2. /etc/passwd user database whose fields give the user name, real name, starting directory for the user, encrypted password, and other information about the user.
  3. /etc/fDPRm Floppy disk parameter list, which describes different floppy disk formats. This can be set using setFDPRM. See the help page for more information on s e T F D P r M.
  4. /etc/fstab specifies the list of file systems that need to be automatically installed at startup. Also includes information about swapon-a-enabled swa P zones.
  5. /etc/group is similar to /etc/passwd, but contains group information instead of user information. Includes various data for the group.
  6. /etc/inittab init Configuration file.
  7. /etc/issue includes the user’s output before the login prompt. Usually includes a short description or welcome message for the system. The details are determined by the system administrator.
  8. /etc/magic Configuration file of f I l e Contains instructions for different file formats, based on which “F I L E” guesses the file type.
  9. /etc/motd motd is short for Message of the day, which is automatically displayed after a successful login. The content is determined by the system administrator. Often used to announce information, such as planned shutdown warning, etc.
  10. /etc/mtab List of the currently installed file systems. Initialized by the script (s c r I t p) and automatically updated by the mount command. Used when you need a list of currently installed file systems (for example, the df command).
  11. /etc/shadow Shadow password file on the system where the shadow (shadow) password software is installed. The shadow password file moves the encrypted password from the/e t c/p a s s wd file into/e t c/s h a d o w, which is readable only to the superuser (r o o t). This makes it more difficult to decipher the password, thus increasing the security of the system.
  12. /etc/login.defs log I n Configuration file of the command.
  13. /etc/printcap is similar to /etc/termcap, but for printers. The syntax is different.
  14. /etc/profile, /etc/cs H. l o g I n, /etc/csh. CSHRC Files that are executed during login or startup b o u r n e or c Shells This allows the system administrator to set up a global default environment for all users.
  15. /etc/securetty Identifies the secure terminal, that is, which terminal allows the super user (R O O T) to log in. Generally, only the virtual console is listed, which makes it impossible (or at least difficult) to break into the system and gain superuser privileges through a modem (M o d e M) or network.
  16. /etc/shells Lists the available shells. The CHSH command allows the user to change the login password within the specified range in this file. The server process FTPD that provides the service for a machine ftp checks whether user she L is listed in the /etc/shells file. If not, the user is not allowed to log in.
  17. /etc/termcap Terminal performance database. Describes what “escape sequences” are used to control the different terminals. Instead of writing an escape sequence directly (so it only works on a particular brand of terminal), you write a program to look for the correct sequence of work to do from /etc/termcap. In this way, most programs can run on most terminals.

/dev file system

The /dev directory contains device files for all devices. Device files are named with a specific convention, which is explained in the device list. Device files are generated by the system at installation time and can be described later with /dev/makedev. / dev/makede v. Local is a description written by a system administrator for a local device file (or connection) (i.e. some non-standard device drivers are not part of the standard Makedev). Here is a brief introduction to some common files under/d e v.

  1. /dev/console The system console, which is the monitor directly connected to the system.
  2. /dev/hd I de Disk driver interface. For example, / d e v/h d A refers to the first hard disk, and h a d 1 refers to the first partition of/d e v/h da. If there are other hard disks in the system, they are/d e v/h d b, / d e v/h d c, and…… ; H d a 1, h d a 2……
  3. /dev/sd s c s I Disk driver interface. If a system has a hard disk, it will not access/d e v/h a d, but will access/d e v/sd a.
  4. /dev/fd Floppy device driver. For example: / d e v/f d 0 refers to the first floppy disk of the system, which is usually called a: disk, / d e v/f d 1 refers to the second floppy disk,…… / d e v/f d 1 h 1 4 40 indicates the access to 4. 5 high-density disk in drive 1.
  5. /dev/st s c s I Tape drive driver.
  6. /dev/tty provides virtual console support. For example, / d e v/t t Y 1 indicates the first virtual console of the system, and/d e v/t t y2 indicates the second virtual console of the system.
  7. /dev/pty Provides remote login pseudo-terminal support. The/d e v/p t y device is used for te l n e T login.
  8. /dev/ttys computer serial interface, for d o s is “C o m 1” port.
  9. /dev/cuA Computer serial interface, the device used with the modem.
  10. /dev/null “black hole”, all information written to the device will disappear. For example, if you want to hide the output on the screen, just input the output to/d e v/n u L L.

/usr file system

The /usr directory is an important one, and it is usually a large file system because it is where all programs are installed. All files in /usr normally come from the l I n u x distribution (d I s t r I b u t I o n); Locally installed programs and other things are in /usr/local because you can upgrade a new version of the system or a new distribution without having to reinstall the entire program. Much of what is in the /usr directory is optional, but these features make the system more efficient for users. / u s r can accommodate many large software packages and their configuration files. Some important directories are listed below (some less important ones have been omitted).

  1. /usr/x11r6 contains all executable programs, configuration files, and support files for x wi N D o W system. To simplify x development and installation, x files are not integrated into the system. X WI N D O W system is a powerful graphics environment, provides a large number of graphics tools. If users are familiar with Microsoft WI D O w s or M a C H I T O S H, they will not feel helpless to x Win D O W system.
  2. /usr/x386 is similar to /usr/x 11r6, but is specifically for x 11 release 5.
  3. /usr/bin is the system’s software library, which contains almost all user commands. Other commands are in /bin or /usr/local/bin.
  4. /usr/sbin includes unnecessary system administration commands for the root file system, such as most service programs.
  5. /usr/man, /usr/ I n f o, /usr/ d o c these directories contain all man pages, g n u information files, and various other documentation files. Each section of the online manual has two subdirectories. For example, / u s r/m a n/m a n 1 contains the source code of section 1 of the online manual (without formatting the original file), and/u s r/m a n/c a t 1 contains the formatting content of section 1. L The online manual is divided into the following nine sections: internal commands, system calls, library functions, devices, file formats, games, macro packages, system administration and core programs.
  6. /usr/include includes c header files, most of which end in.h. These files describe data structures, subprocedures, and constants used in C programs. For consistency, this should actually be placed under /usr/lib, but that name has traditionally been used.
  7. /usr/lib contains the invariant data files of the program or subsystem, including some configuration files. The name L I b comes from library; The original programming library is also stored in /usr/lib. When a program is compiled, it connects to its libraries. There are also many programs that store configuration files in them.
  8. /usr/local where locally installed software and other files are stored. This is very similar to/u, s, r. Users may find some large packages here, such as T e X, E M A C S, etc.

/var file system

/var contains data that is normally changed when the system is running. Usually the size of the directory in which the data resides is constantly changing or expanding. Some of the contents of the/v a r directory were in/u s r, but in order to keep the/u s r directory relatively stable, we put the contents that need to be changed frequently in/v a r. Each system is specific, that is, not shared with other computers over the network. Some important directories are listed below (some less important ones are omitted).

  1. /var/catman includes a formatted help page. The source files of the help page generally exist in/u s r/m a n/m a n. Some pages may have a preformatted version in/u s r/m an/c a t. The other pages need to be formatted the first time they are viewed. The formatted version is stored in /var/man so that other people do not have to wait for formatting when they view the same page again. (/var/catman is often cleared, just like a temporary directory.)
  2. /var/lib stores files that need to be changed when the system is running properly.
  3. /var/local stores the mutable data of programs installed in /usr/local (that is, programs installed by system administrators). Note that even locally installed programs use other /var directories, such as /var/lock, if necessary.
  4. /var/lock Locks the file. Many programs follow the convention of generating a lock file in /var/lock to support the specific device or file they are using. When other programs notice the lock file, they stop using the device or file.
  5. /var/log Log files of various programs, especially login (/var/log/wtmp log records all logins and logouts to the system) and syslog (/var/log/messages records all core and system program information). Files in /var/log often grow unpredictably and should be purged periodically.
  6. /var/run saves information about the system that is valid until the next system boot. For example, /var/run/utmp contains information about the currently logged in user.
  7. /var/spool The directory in which the spool (spoo L) program is placed, such as m a I L, n e w s, print queues, and other queues work. Each different directory has its own subdirectory under /var/spool. For example, users’ mailboxes are stored in /var/spool/mail.
  8. /var/tmp allows temporary files that are larger or need to last longer than/TMP. Note that the system administrator may not allow /var/tmp to have very old files.

/proc file system

The /proc file system is a pseudo-file system, meaning that it is a directory that doesn’t actually exist, making it a very special directory. It does not exist on a disk, but is generated in memory by the core. This directory is used to provide information about the system. Some of the most important files and directories are described below (the /proc file system is explained in more detail on the Proc Man page).

  1. /proc/x Directory of information about process X, where x is the process id. Each process has a directory named its own process number under /proc.
  2. /proc/cpuInfo Stores CPU information, such as CPU type, manufacturer, model, and performance.
  3. /proc/devices A list of device drivers currently running in the core configuration.
  4. /proc/dma Displays the dma channel currently in use.
  5. /proc/filesystems File system information in the core configuration.
  6. /proc/interrupts Displays information about occupied interrupts and occupiers, and the number of occupied interrupts.
  7. /proc/ioports I/O port currently in use.
  8. /proc/kcore System physical memory image. It’s exactly the same size as physical memory, but it doesn’t actually take up that much memory; It is created only when a program accesses it. (Note: nothing under /proc takes up any disk space unless you copy it somewhere.)
  9. /proc/kmsg Specifies the message output by the core. It will also be sent to S, Y, S, L, O, G.
  10. /proc/ksyms core symbol table.
  11. /proc/loadavg Load average of the system; Three meaningless indicators indicate the current workload of the system.
  12. /proc/meminfo Various memory usage information, including physical memory and swap partition (S w A P).
  13. /proc/modules stores information about which core modules are currently loaded.
  14. /proc/net Indicates the network protocol status.
  15. /proc/self a symbolic link to the process directory of the program viewing /proc. When 2 processes view /proc, these will be different connections. This is mainly convenient for the program to get its own process directory.
  16. /proc/stat The different states of the system, for example, the number of page errors since the system started.
  17. /proc/uptime Indicates the duration of system startup.
  18. /proc/version Core version