Linux directory structure

Source: Internet
Author: User

Note: Available from other Web pages for collection. The first time you write a blog, it's not going to work.

/

  • Root---Some of the core files used when starting Linux. such as operating system kernel, boot program grub and so on.
  • Home---Store personal files for ordinary users
    • FTP---User-owned services
    • httpd
    • Samba
    • User1
    • User2
  • Bin---execution file (binary) required for system startup
  • Sbin---executable program directories, but most of them contain commands that involve system administration. Only root privileges can be performed
  • Proc---Virtual, there is a Linux kernel image, save all kernel parameters and system configuration information
    • 1---process number
  • USR---user directory, storing user-level files
    • Bin---commands used by almost all users, in addition to the presence of/bin,/usr/local/bin
    • Sbin---system administrator commands, related to users, for example, most server programs
    • Include---the directory where C + + header files are stored
    • LIB---fixed program data
    • Local---Where to save the locally installed software
    • Man---manual-generated directory
    • Info---information document
    • Doc---Different package document information
    • Tmp
    • X11R6---This directory is used to save all the files that are required to run X-window. The directory also contains the configuration files and binaries that are used to run the GUI.
    • X386---Features with x11r6,x11 release 5 system files
  • Boot---Boot loader required files, the system needs the picture saved in this
  • LIB---the common library of programs and core modules under the root file system directory
    • Modules---loadable module, reboot required module after system crash
  • Dev---device file directory
  • ETC---configuration file
    • Skel---Home directory, this directory is initialized
    • Sysconfig---network, time, keyboard and other configuration directory
  • Var
    • File
    • Lib---Files in this directory will change when the system is running
    • Local---Program data installed in the/usr/local, changing the
    • Lock---File is locked with a specific peripheral or file and other files are temporarily inaccessible
    • Log---Logging
    • Run---system running legitimate information
    • Spool---printer, mail, proxy server, etc. spool directory
    • Tmp
    • Catman---cache directory
  • MNT---A temporary place to mount the file system. In general, this directory is empty, and when we are going to mount the partition, we will set up a directory in this directory, and then mount the device we are going to access in this directory so that we can access the file.
  • TMP---Temp file directory, temporary files after system startup are stored in/var/tmp
  • Lost+found---Files recovered during file system repair

/: root directory, the general root directory only storage, do not store files,etc,/bin,/dev,/lib ,/sbin should be placed in a partition with the root directory

/bin:/usr/bin: can be a directory that executes binary files, such as common commands ls, tar, MV, Cat, and so on.

/boot: put Some files that were used when the Linux system was started. /boot/vmlinuz is the kernel file for Linux , as well as /boot/gurb. recommended separate partition, partition size 100M

/dev: storing The device files under the Linux system and accessing a file in that directory is equivalent to accessing a device, which is commonly used to mount the optical drive mount/dev/cdrom/mnt.

/etc: the directory where the system configuration file is stored, the executable file is not recommended in this directory, the important configuration file is /etc/inittab,/etc/fstab,/etc/ INIT.D,/etc/x11,/etc/sysconfig,/etc/xinetd.d Remember to back up the configuration file before modifying it.

Note:/etc/x11 stores settings related to x Windows .

/home: system Default User home directory, add user account, the user's home directory is stored in this directory,~ represents the current user's home directory,~test represents the user test Home directory. It is recommended to separate partitions and set up a large disk space for user-friendly data storage

/lib:/usr/lib:/usr/local/lib: The system uses the library's directory, the program in the execution process, needs to call some additional parameters when the function library assists, the more important directory is /lib/modules.

/lost+fount: when a system exception generates an error, some missing fragments are placed in this directory, which usually appears automatically in the Appliance directory. If the hard drive is loaded in/disk, the directory will be automatically generated in this directory /disk/lost+found

/mnt:/media: CD-ROM default mount point, usually the disc is mounted under/mnt/cdrom, or not necessarily, you can choose any location to mount.

: A directory for the host to install additional software. For example: fc4 used fedora Community development software, if you want to install the new kde desktop software, you can install the software in this directory. The previous linux system, used to be placed in the /usr/local

: This directory of data are in memory, such as system core, external device, network status, because the data are stored in memory, so do not occupy disk space, the more important directory has /proc/cpuinfo /proc/interrupts , /PROC/DMA , /proc/ioports , /proc/net/*

: system administrator Root home directory, the system first boot partition is / /root / placed under a partition.

: Place executable commands used by system administrators, such as fdisk shutdown mount /bin Span style= "Font-family:verdana" >root commands used, general users can only " view "

/tmp: The directory where the files are temporarily stored by the general user or the program being executed , accessible to anyone , Important data cannot be placed in this directory

/srv: data directories that need to be accessed after the service is started, such as the Web page data that the WWW service needs to store within /srv/www

/usr: Application Storage directory,/usr/binStore Applications,/usr/sharestore shared data,/usr/libstorage cannot be run directly, but it is necessary for many programs to run some library files. /usr/local:Store the software upgrade package. /usr/share/doc:System description file storage directory. /usr/share/man:Program description file storage directory, usingMans LSwill be queried when/usr/share/man/man1/ls.1.gzof the contentIt is recommended to separate partitions to set large disk space

/var: place files that change frequently during the execution of the system, such as log files that change at any time /var/log,/var/log/message: All the login files are stored in the directory, /var/spool/mail : The directory where the mail is stored, /var/run: when a program or service starts, its The PID is stored in this directory. It is recommended to separate partitions to set large disk space

Linux directory structure

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.