[Linux Basic Learning] The default directory description

Source: Internet
Author: User
Tags system log

The following table lists the default directories or files for Linux and their uses:

Catalog/File Use Source
/ /At the top of the Linux file system tree structure, it is the gateway to the Linux file system, and all directories, files, and devices are in/below. -
/bin This directory holds the most important commands most commonly used by the system, equivalent to internal commands under DOS, except that they exist in a separate file form. For example: LS, CP, mkdir and other commands. The files in this directory are executable and are commands that ordinary users can use. The commands that are the basis of the system are put here. Binary
/usr This directory is where the system stores programs, such as common 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 that is officially provided by the package, it is mostly installed here. When there is a configuration file involving the server, the configuration file is installed in the/etc directory. The/usr directory includes the font directory/usr/share/fonts, help directory/usr/share/man, or/usr/share/doc.

Unix Shared Resource

/var The contents of this directory are frequently changed, and/var has a directory where the/var/log directory is used to store the system log. 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 that involve system administration are stored in this directory, which is the executable command place of the superuser root, the normal user does not have permission to execute the command under this directory, and the commands contained in directory sbin are root permission to execute. Super User Binary
/root The home directory for Linux Super User (System administrator) root. -
/home Normal user's home directory is stored in this directory by default, for example: There is a user named Wang, then its main directory is/home/wang, can also be expressed in ~wang. -
/etc This directory is the location of the system configuration files, some server configuration files are also here, such as: User account and password configuration files. Etcetera
/dev The device files are stored in this directory, which is the external device files for all Linux, which functions 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 the operation and control of the device. So the devices and files in Linux are accessed in the same way. Device
/boot The Linux kernel and the files required to boot the system are stored in this directory, such as Vmlinuz, initrd.img, and so on. In general, the GRUB or LILO system Boot Manager is in this directory. -
/opt This directory is an optional package installation directory, and some packages we can install it in this directory. Optional
/tmp This directory is used to hold temporary files, and sometimes when a user runs a program, some temporary files are generated. /tmp is used to store temporary files. The/var/tmp directory and the directory are similar in function. Temporary
/lost+found In ext2 or ext3 file systems, some of the resulting file fragments are stored in this 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 problems with the system, a lot of files are moved to this directory, it may be done in a manual way to repair, or moved to the original location of the file. -
/lib This directory is used to store library files, which contain the most basic shared library of the system, which acts like a. dll file in Windows. These shared libraries are required for almost all applications. Library
/mnt This directory is used to hold the mounted storage device mount directory, the system provides this directory is to allow users to temporarily mount other file systems, such as the CDROM directory. Mount
/proc When the operating system is running, the process (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 spoofed file system proc, Proc is not a real file system. Therefore, this directory is a virtual directory, it 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 This directory can be used to store miscellaneous files or directories, that is, files or directories whose purpose or meaning is ambiguous can be stored in that directory. Miscellany
/media Mount points for plug-and-play storage devices are automatically created in this directory. For example, when the USB disk system is automatically mounted, a directory will be generated in this directory, and Cdrom/dvd will create a directory in this directory, similar to the CDROM directory. This directory is only available on the latest release kit. -
/initrd The kernel of the system before booting is compressed (this is related to RAMDisk), when the system starts, it needs to be decompressed, the directory is the temporary directory when it is decompressed, and then the directory is emptied when it is started. Boot loader initialized RAM disk
/usr/man This directory is the directory where the 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 The list of all devices configured by the current running kernel. -
/proc/filesystems The file system configured by the currently running kernel. -
/proc/dma The DMA channel that is currently in use. -
/proc/interrupts The interrupts being used and the number of interrupts that were ever made. -
/proc/ioports The I/O port that is currently in use. -
/etc/init.d This directory is used to store scripts that are launched by the system or server in System V mode, which is common in systems that are started or initialized in Mode v. Like Redhat Fedora. -
/etc/xinetd.d If the server is running in xinetd mode, its script will be placed in this directory. Some systems do not have this directory, such as Slackware, and some older versions do not. Available in the newer version of Redhat Fedora. -
/etc/rc.d This is a directory in the Slackware distribution, is the BSD way to start the storage of scripts, such as the definition of network cards, server open scripts and so on. -
/etc/x11 is the location where the X-window related configuration files reside. -
/usr/bin This directory is a directory of executable programs, the normal user has permission 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 mostly contains commands that involve system administration. Only root privileges can be performed, similar directories are/sbin or/usr/local/sbin or/usr/x11r6/sbin. -
/usr/local This directory is generally used to store user-compiled installation software directory. Usually is installed through the source code package software, if not specifically designated installation directory, it is generally installed in this directory. -
/usr/lib This directory is similar to the/lib directory, which is the storage directory for the library files. Store some common shared libraries. -
/usr/share This directory is used to store things shared by the system, such as/usr/share/fonts is a font directory and is shared by users. -
/usr/share/doc This directory is the place 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 of storage, below 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, the directory of its kernel source packages is located in a directory in the/usr/src/kernels directory (the corresponding directory will be generated only after installation). -
/var/adm For example, package installation information, logs, management information, etc. are stored in this 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 The spool directories such as printers, mail, proxy servers, and so on are stored in this directory. -

650) this.width=650; "src=" Http://pic002.cnblogs.com/images/2011/99057/2011110620371927.png "/>

This article is from "Mars Man-god Self-uncommon" blog, please be sure to keep this source http://marsman.blog.51cto.com/6410055/1913968

[Linux Basic Learning] The default directory description

Related Article

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.