Linux default directory detailed introduction

Source: Internet
Author: User
Tags system log
Directory/File Use Source
/ /At the top of the Linux file system tree structure, it is the gateway to the Linux file system, all directories, files, devices are under/. -
/bin This directory holds the most important commands most commonly used by the system, which is equivalent to the internal commands under DOS, except that they exist as separate file forms. For example: LS, CP, mkdir and other commands. The files in this directory are executable and can be used by ordinary users. The most basic commands for the system are here. Binary
/usr The directory is where the system is stored, such as general commands, Help files, installed software, and so on. There are a lot of files and directories under this directory. When we install a Linux distribution official package, most of them are installed here. When there is a configuration file involving the server, the configuration file is installed in the/ETC directory. The/usr directory includes font directory/usr/share/fonts, help directory/usr/share/man, or/usr/share/doc.
Unix Shared Resource
/var The contents of the directory are frequently changed, and there is a directory in the/var/log directory used to hold the system log/var. The/var/www directory is used to define the Apache server site storage directory. /var/lib is used to store some library files. Variable
/sbin Most of the commands involved in system management are stored in this directory, which is a super permission user root executable command store, ordinary users do not have the right to execute the directory commands, the directory sbin contains the commands are root permissions to execute. Super User Binary
/root Linux Super Rights User (System administrator) the home directory of root. -
/home The home directory of ordinary users is stored by default in this directory, for example: a user named Wang, its main directory is/home/wang, can also be expressed in ~wang. -
/etc The directory is the location of the system configuration file, some of the server's configuration file is here, such as: User account and password configuration file. Etcetera
/dev The device files are stored in this directory, which is a directory of all Linux external device files that function like the. sys file under DOS and the. vxd file under win. Linux uses the device as a file and abstracts the device, which greatly facilitates our control of the operation of the device. Therefore, the devices and files in Linux are accessed in the same way. Device
/boot The Linux kernel and the files needed to boot the system are stored in the directory, such as Vmlinuz, initrd.img, and so on. In general, the GRUB or LILO system Boot Manager is in this directory. -
/opt The directory is an optional package installation directory, and some packages can be installed in this directory. Optional
/tmp This directory is used to store temporary files, sometimes when the user runs the program, some temporary files are generated. /tmp is used to store temporary files. The/var/tmp directory and the directory function are similar. Temporary
/lost+found In a ext2 or ext3 file system, some file fragments are stored in the directory when the system crashes unexpectedly or the machine shuts down unexpectedly. When the system starts in the process the Fsck tool checks here and repairs the corrupted file system. Sometimes there are problems with the system, a lot of files are moved to this directory, may have to be repaired manually, or moved to the original location of the file. -
/lib This directory is used to store library files, which contain the most basic shared libraries of the system, and are similar to the. dll files in Windows. Almost all applications need to use these shared libraries. Library
/mnt This directory is used to store mounted storage device mount directory, the system provides this directory is to allow users to temporarily mount other file systems, such as CDROM directory. Mount
/proc When the operating system is running, the process (the running program) information and kernel information (such as CPU, hard disk partition, memory information, etc.) are stored here. The/proc directory is a mounted directory of the camouflaged filesystem proc, Proc is not a real filesystem. Therefore, this directory is a virtual directory, which is the mapping of system memory, we can access this directory directly to obtain system information. In other words, the contents of this directory are not on the hard disk but in memory. Process
/misc The directory can be used to hold miscellaneous files or directories, that is, files or directories whose purpose or meaning is ambiguous can be stored in the directory. Miscellany
/media The mount point of a plug-and-play storage device is automatically created in this directory. For example, when the USB disk system is automatically mounted, a directory will be generated in this directory; after Cdrom/dvd mount, a directory will also be created in this directory, similar to the CDROM directory. This directory is available only on the latest release suites. -
/initrd The kernel of the system before booting is compressed (this is related to RAMDisk), when the system needs to be uncompressed when it is started, the directory is the temporary directory when decompression, and then the directory is emptied when the boot is finished. Boot loader initialized RAM disk
/usr/man This directory is the directory where Linux system help documents are stored. -
/proc/cpuinfo Information about the processor, such as type, manufacturer, model, and performance. Like Cat/proc/cpuinfo. -
/proc/devices List of all devices that are currently running the kernel. -
/proc/filesystems The file system that the kernel is currently running on. -
/proc/dma The DMA channel that is currently in use. -
/proc/interrupts The interrupts being used and how many interrupts were used. -
/proc/ioports The I/O port that is currently in use. -
/etc/init.d This directory is used to store scripts that are started in System V mode by systems or servers, which are common in systems that are started or initialized in System V mode. Like Redhat Fedora. -
/etc/xinetd.d If the server is running in xinetd mode, its script should be placed in this directory. Some systems do not have this directory, such as Slackware, and some older versions are not. There is a newer version in Redhat Fedora. -
/etc/rc.d This is a directory in the Slackware release, which is a repository for BSD-mode startup scripts, such as defining network adapters, server-initiated scripts, and so on. -
/etc/x11 is the X-window-related configuration file repository. -
/usr/bin This directory is the directory of executable programs, and ordinary users have the right to execute. When we install a program from a package that comes with the system, most of his executables are placed in this directory. A similar directory is the/usr/local/bin directory. Sometimes the files in the/usr/bin are/usr/local/bin linked files. -
/usr/sbin This directory is also a directory of executable programs, but most of them contain commands that involve system administration. Only root permissions can be executed, similar directories are/sbin or/usr/local/sbin or/usr/x11r6/sbin. -
/usr/local This directory is typically used to store directories of user-compiled installation software. Generally, the software is installed through the source package, if you do not specifically specify the installation directory, it is generally installed in this directory. -
/usr/lib This directory is similar to the/lib directory and is the storage directory for the library files. Store some of the common shared libraries. -
/usr/share This directory is used to store things that are shared by the system, such as/usr/share/fonts is a font directory that users share. -
/usr/share/doc This directory is where the Linux shared documents are stored. -
/usr/share/man This directory is the place where the shared Help files are stored. -
/usr/src The directory is the kernel source repository, the following has the kernel source directory, such as Linux, linux-2.xxx.xx directory. Some systems will also install some source software packages here, such as Redhat Fedora. In addition Redhat 4.0/5.0, its kernel source package directory is located in a directory under the/usr/src/kernels directory (only after installation will generate the corresponding directory). -
/var/adm For example, package installation information, log, management information, etc. are stored in the directory, in the Slackware operating system is the directory. It doesn't seem to be in fedora. -
/var/log This directory is used to store system logs. -
/var/spool Fake offline directories such as printers, mail, and proxy servers are stored in this directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.