linux directory structure

Beginner Linux, you first need to understand the standard Linux directory structure

/

  • root --- start some core file used Linux. The operating system kernel, Grub boot program and the like.
  • home --- storing ordinary user's personal files
    • ftp --- all service users
    • httpd
    • samba
    • user1
    • user2
  • Need to start bin --- system executable file (binary)
  • sbin --- executable program directory, but most of the stored command to systems management. Only root privileges to run
  • proc --- virtual, there is a linux kernel image; save all kernel parameters and system configuration information
    • No. 1 --- process
  • usr --- user directory to store user-level file
    • --- bin almost all users command, and additionally the presence / bin, / usr / local / bin
    • sbin --- system administrator commands associated with the user, for example, most of the server program
    • include ---   storage directory C / C ++ header files
    • a fixed program data lib ---
    • local --- locally installed software saved location
    • man --- hand-generated directory
    • info --- Information Document
    • doc --- different packages document information
    • tmp
    • X11R6 ---   This directory is used to save all the files needed to run X-Window. The catalog also contains a GUI to run configuration files and binary files.
    • X386 --- function with X11R6, X11 Release 5 system files
  • boot --- boot loader required documents, the system needed to save the picture here
  • lib ---  public library in the root directory of the file system and the core modules of the program
    • --- modules loadable module, as required for the restart after a system crash module
  • dev --- device file directory
  • etc --- Profiles
    • skel --- home directory is established, the directory is initialized
    • sysconfig --- network, time, keyboard configuration directory
  • where
    • file
    • lib --- files in that directory in the system is running, it will change
    • --- program installed in the local data / usr / local, variable
    • lock --- use a particular file or file peripherals, its locked temporarily unable to access other files
    • log log ---
    • run --- legal information system operation
    • spool --- printers, mail, proxy servers, etc. spool directory
    • tmp
    • catman --- cache directory
  • mnt --- for a temporary place to mount the file system. Under normal circumstances this directory is empty, and create a directory in this directory when we are going to mount the partition, and then we will want to access devices mounted on this directory, so that we can access the files.
  • tmp --- temporary files directory, temporary files after system startup is stored in / var / tmp
  • lost + found --- recovery when the file system repair file

 

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

/ bin: / usr / bin: executable binary files directory, commonly used commands such as ls, tar, mv, cat and so on.

/ boot: put some files used when starting linux system. / boot / vmlinuz for the linux kernel file, and / boot / gurb. It recommended a separate partition, partition size to 100M

/ dev: store the device under linux file system, access a file in the directory, which is equivalent to access a device commonly used to mount the CD mount / dev / cdrom / mnt.

/ etc: system configuration files directory is not recommended to store executable files in this directory, it is important configuration files have /etc/inittab,/etc/fstab,/etc/init.d,/etc/X11,/etc remember before the backup /sysconfig,/etc/xinetd.d modify the configuration file.

Note: / etc / X11 store associated with the x windows settings.

/ home: the default user's home directory, create a new user account, the user's home directory are stored in this directory, ~ represents the current user's home directory, ~ test represents the home directory of the user test. It recommended a separate partition, and a larger set of disk space to store user data

: / lib: / usr / lib : / usr / local / lib need help library when the library system directory, the program in the implementation process, you need to call some additional parameters, the more important directory is / lib / modules.

/ lost + fount: the system generates an error exception, will lose some of this fragment is placed under the directory, usually this directory will automatically appear in the directory means. The load in the hard disk / disk in this directory will be automatically generated directory / disk / lost + found

/ mnt: / media: disc default mount point, generally disc mounted at / mnt / cdrom, not necessarily, be mounted at any position can be selected.

/ opt: to host an additional install the software place the directory. Such as: Fedora community development software FC4 use, if you want to install their own new KDE desktop software, you can install the software in the directory. Previous Linux system, used to be placed in the / usr / local directory

/ proc: The data in this catalog are in memory, such as system core, peripherals, network status, since the data are stored in memory, so do not take up disk space, the more important directories have / proc / cpuinfo, / proc / interrupts , / proc / dma, / proc / ioports, / proc / net / * etc.

/ root: system administrator root's home directory, the system first boot partition for /, so it is best to / root and / placed under a partition.

/ sbin: / usr / sbin: / usr / local / sbin: executable instructions placement system administrators, such as fdisk, shutdown, mount the like. And / bin difference is that these directories are commands to the system administrator root to use, the average user can only "see" and can not set up and use.

/ tmp: general user or program being executed temporary storage directory files, anyone can access the important data can not be placed in this directory

/ srv: the service started need to access the data directory, Web services need to access data such as www stored in srv / in the / www

/ usr: application storage directory, / usr / bin storage applications, / usr / report this content share stored data sharing, / usr / lib store can not be run directly, but some library files necessary to run many programs. / usr / local: storage software upgrade package. / usr / share / doc: system description file storage directory. / usr / share / man:  the program documentation storage directory, the query will use man ls content /usr/share/man/man1/ls.1.gz of recommended separate partition, set a large disk space

/ var: during the execution of placement systems frequently changing files, log files, such as to change the / var / log, / var / log / the Message: All of the log file storage directory, / var / spool / mail : e-mail stored in the directory, / var / run: after the program or service is started, its PID is stored in the directory. Recommended a separate partition, set a large disk space

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

/ bin: / usr / bin: executable binary files directory, commonly used commands such as ls, tar, mv, cat and so on.

/ boot: put some files used when starting linux system. / boot / vmlinuz for the linux kernel file, and / boot / gurb. It recommended a separate partition, partition size to 100M

/ dev: store the device under linux file system, access a file in the directory, which is equivalent to access a device commonly used to mount the CD mount / dev / cdrom / mnt.

/ etc: system configuration files directory is not recommended to store executable files in this directory, it is important configuration files have /etc/inittab,/etc/fstab,/etc/init.d,/etc/X11,/etc remember before the backup /sysconfig,/etc/xinetd.d modify the configuration file.

Note: / etc / X11 store associated with the x windows settings.

/ home: the default user's home directory, create a new user account, the user's home directory are stored in this directory, ~ represents the current user's home directory, ~ test represents the home directory of the user test. It recommended a separate partition, and a larger set of disk space to store user data

: / lib: / usr / lib : / usr / local / lib need help library when the library system directory, the program in the implementation process, you need to call some additional parameters, the more important directory is / lib / modules.

/ lost + fount: the system generates an error exception, will lose some of this fragment is placed under the directory, usually this directory will automatically appear in the directory means. The load in the hard disk / disk in this directory will be automatically generated directory / disk / lost + found

/ mnt: / media: disc default mount point, generally disc mounted at / mnt / cdrom, not necessarily, be mounted at any position can be selected.

/ opt: to host an additional install the software place the directory. Such as: Fedora community development software FC4 use, if you want to install their own new KDE desktop software, you can install the software in the directory. Previous Linux system, used to be placed in the / usr / local directory

/ proc: The data in this catalog are in memory, such as system core, peripherals, network status, since the data are stored in memory, so do not take up disk space, the more important directories have / proc / cpuinfo, / proc / interrupts , / proc / dma, / proc / ioports, / proc / net / * etc.

/ root: system administrator root's home directory, the system first boot partition for /, so it is best to / root and / placed under a partition.

/ sbin: / usr / sbin: / usr / local / sbin: executable instructions placement system administrators, such as fdisk, shutdown, mount the like. And / bin difference is that these directories are commands to the system administrator root to use, the average user can only "see" and can not set up and use.

/ tmp: general user or program being executed temporary storage directory files, anyone can access the important data can not be placed in this directory

/ srv: the service started need to access the data directory, Web services need to access data such as www stored in srv / in the / www

/ usr: application storage directory, / usr / bin storage applications, / usr / report this content share stored data sharing, / usr / lib store can not be run directly, but some library files necessary to run many programs. / usr / local: storage software upgrade package. / usr / share / doc: system description file storage directory. / usr / share / man:  the program documentation storage directory, the query will use man ls content /usr/share/man/man1/ls.1.gz of recommended separate partition, set a large disk space

/ var: during the execution of placement systems frequently changing files, log files, such as to change the / var / log, / var / log / the Message: All of the log file storage directory, / var / spool / mail : e-mail stored in the directory, / var / run: after the program or service is started, its PID is stored in the directory. Recommended a separate partition, set a large disk space

Guess you like

Origin www.cnblogs.com/zhaohaiyu/p/11431678.html