Meaning of linux folders (the most complete version)

Source: Internet
Author: User
Tags temporary file storage

Meaning of linux folders (the most complete version)/bin: where binary programs live. /boot: the special programs that start the system when you turn the machine on. /dev: aaaaaalll the "device" listings for hardware of every concievable flavor, along with some "imaginary" devices, lile/dev/null and/dev/zero. when you get a random number it usually comes from/dev/random. /etc: configuration files. /home: the user's directories Live here. /lib: the library files that programs need to run, if they are compiled to link against these libraries. /lost + found: look here after a system crash/kernel panic or other extreme scenario to find "orphaned" files. /misc: kinda reminds you of/etc, doesn' t it? Every time I see this folder on a system, it's empty, but I ascertain that it stands for "miscellaneous ", and I think it may be a place for users to keep their own "/etc" type files? /Mnt: "mount", the directory that acts as a gateway to every other disk or file system. floppies are accessed from/mnt/floppy, your second hard drive might be/mnt/hd here, and so on. /opt: "optional", where programs that are installed after the initial system install sometimes end up. /proc: running "processes ". the "everything is a file" paradigm carried to the Linux degree! This folder hosts fileswhich keep tabs on boring stuff like what daemons are running and the process ID of Emacs while you haveEmacs open./root: root's home! /Sbin: the "system-administrator's bin file", which hosts programs that wocould be in/bin if they didn't have "root-only" access permissions. /tmp: "temporary" files, of use by programs which need to throw together a data file on-the-fly in preperation forexecuting some other task. this folder gets flushed on reboot. /usr: "user ". practically a whole other system in here,/usr/bin is still more binari Es,/usr/doc and/usr/share/doc aredocumentation folders, /usr/share/games/fortune is where the funny quotes come from when you log on (ifthat feature is enabled ). the idea is that this shoshould be where files/programs accessible by all users shouldbe, and thus your desktop backgrounds come from/usr/share/wallpapers, or such. the other case is newlyinstalled programs sometimes end up in/usr/local/ Bin. /var: "variable ". system logs in here, recording such things as the last foo commands typed at the prompt, start-upboot messages, and such. chinese:/bin binary executable command binary/dev special file device/etc system management and configuration file 1, editable text configuration 2, etce.pdf/etc/rc. d. Start the configuration file and script run commands/home. The base point of the user's home directory,/lib standard programming library, also known as dynamic link shared library/sbin system management commands, the temporary file storage point temporary/root system management shared by system binary/tmp is stored here. The main directory/mnt system provides this directory for users to temporarily mount other file systems. mount/lost + found is usually empty, the "Homeless" file left after the system shuts down abnormally is located in the/proc virtual directory, which is the ing of the system memory. You can directly access this directory to obtain the system information processes/var. For example, the log file variable/usr of various services is the largest directory, almost all the applications and files to be used are in this directory. Including: 1, user 2, many Unix System Resources/usr/bin applications/usr/sbin hyperuser management programs/usr/include header files required for developing and compiling applications in linux/usr/lib the configuration file/usr/src Source Code of commonly used dynamic link libraries and software packages, the source code of the Linux kernel is stored here. The command/usr/local/bin is added locally. The command/usr/local/lib is added locally. There are multiple interpretations of some folders, it would be nice to find the original authoritative explanation in the future. linux folders: file structure in linux, see what each folder uses. The/bin binary executable command/dev device special file/etc system management and configuration file/etc/rc. d. Start the configuration file and script/home user home directory base point. For example, if the user's home directory is/home/user, you can use ~ User indicates the/lib standard programming library, also known as dynamic link shared library, which works like in windows. dll file/sbin system management command, which stores the temporary file storage point used by the system administrator/tmp public/root system administrator's main directory (haha, privileged class) /the mnt system provides this directory for users to temporarily Mount other file systems. The/lost + found directory is usually empty, and the system shuts down abnormally, leaving a "Homeless" file (what is it in windows. chk) Here, the/proc virtual directory is the ing of the system memory. You can directly access this directory to obtain system information. /Var the overflow of some large files. For example, the log files of various services/the largest directory of usr, almost all the applications and files to be used are in this directory. Including: /usr/x11r6 stores the x window directory/usr/bin numerous applications/usr/sbin hyperuser management programs/usr/doc linux documentation/usr/include development in linux and the header file/usr/lib commonly used dynamic link library and software package configuration file/usr/man help file/usr/src Source Code required for compiling the application, the source code of the linux kernel is stored in the/usr/src/linux/usr/local/bin command/usr/local/lib. Generally, the space occupied by the root file system should be relatively small, because most of the files do not need to be changed frequently, and strict files and a small file system that does not change frequently are not prone to damage. Except for a possible/v m l I n u z standard system boot image, the root directory generally does not contain any files. All other files are in the subdirectory of the root file system. 1. The/bin directory/B I n directory contains the commands required for boot or commands that common users may 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 them are important system files in the system. 2. The/sbin directory/s B I n directory is similar to/bin and is also used to store binary files. Most of these files are basic system programs used by the system administrator. Although common users can use them when necessary and allowed, they are generally not used by common users. 3. the/etc directory/e t c directory stores various system configuration files, including the user information file/e t c/p a s w d, system initialization file/e t c/r c. L I n u x is exactly * These files can run normally. 4. The/root directory is the root user directory. 5. The/lib directory/l I B directory is the shared library required by the Program on the root file system. It stores the shared files required for the root file system program to run. These files contain code that can be shared by many programs, so that each program contains a sub-book of the same subroutine, so that the executable file can be smaller and save space. 6. the/lib/modules directory contains the system core which can be loaded with various modules, in particular, modules (such as network and file system drivers) required to re-import the system when a corrupt system is restored ). 7. The/dev directory/d e v directory stores the device files, that is, the device driver. You can use these files to access external devices. For example, users can access the mouse input by accessing/d e v/m o u s e, just like accessing other files. 8. The/tmp directory stores information and data generated by the program during running. However, after boot, it is best to use/v a r/t m p to replace/tmp for the running program, because the former may have a larger disk space. 9. the/boot directory/B o t directory stores the files used by the bootstrap loader, such as l I o. The core images are often stored here, rather than in the root directory. However, if there are many core images, this directory may become very large, and it would be better to use a separate file system. Note that the core image must be in the first 1 0 2 4 cylinder of the I d e hard drive. 10./mnt directory/m n t directory is the installation point for the temporary installation of the file system (m o u n t) by the system administrator. The program does not automatically support installation to/mnt. /Mnt can be divided into many sub-directories. For example,/mnt/dosa may be a soft drive using the m s d o s file system, the/mnt/exta may be a soft drive using the e x t 2 file system, or a/mnt/cdrom Optical Drive. 11. install other file systems in the/proc,/usr,/var,/home directory. The/etc File System/etc directory contains various system configuration files, which are described below. Others you should know which program they belong to and read the m a n pages of the program. Many network configuration files are also in/etc. 1./etc/rc or/etc/rc. d or/etc/rc ?. D. Directory of the script or script that is run at the running level. 2./etc/passwd user database. The domain in the database provides the user name, real name, user start directory, encrypted password, and other user information. 3. the/etc/fdprm floppy disk parameter table describes different floppy disk formats. Setfdprm can be used for setting. For more information, see the Help page of s e t f d p r m. 4./etc/fstab specifies the list of file systems to be automatically installed at startup. It also contains information about the s w a p zone enabled with swapon-. 5./etc/group is similar to/etc/passwd, but it does not indicate user information but group information. Including various data of the group. 6./etc/inittab init configuration file. 7./etc/issue includes the user's output information before the logon prompt. It usually includes a short description or welcome information of the system. The specific content is determined by the system administrator. 8./etc/magic "f I l e" configuration file. Contains descriptions of different file formats. "f I l e" is based on the file type. 9./etc/motd m o t d is short for message of the day, which is automatically output after the user logs on successfully. The content is determined by the system administrator. It is often used for notification information, such as warning about the scheduled shutdown time. 10./etc/mtab list of the currently installed file systems. Initiated by the script (s c r I t p) and automatically updated by the mount command. Use (such as the df command) when you need a list of currently installed file systems ). 11./etc/shadow the shadow password file on the system where the shadow (s h a d o w) password software is installed. In the shadow password file, move the encrypted password in the/e t c/p a s w d file to/e t c/s h a d o w, the latter is only readable to Super Users (r o t. This makes password deciphering more difficult and increases the security of the system. 12./etc/login. defs l o g I n command configuration file. 13./etc/printcap is similar to/etc/termcap, but for printers. Different syntaxes. 14. /etc/profile,/e t c/c s h. l o g I n,/etc/csh. files executed by B o u r n e or c shells during cshrc logon or startup. This allows the system administrator to create a global default environment for all users. 15./etc/securetty confirm the security terminal, that is, the terminal that allows the Super User (r o t) to log on. Generally, only the virtual console is listed, so it is impossible (at least difficult) to break into the system through a modem (m o d e m) or network and obtain the Super User Privilege. 16./etc/shells lists the available s h e l. The chsh command allows you to change the logon s h e l within the range specified in this file. The ftpd service process that provides a machine f t p service checks whether the user s h e l is listed in the/etc/shells file. If not, the user is not allowed to log on. 17./etc/termcap terminal performance database. Describes the escape sequence used by different terminals. When writing a program, the escape sequence is not output directly (this can only work on terminals of a specific brand), but the correct sequence of the work to be done is searched from/etc/termcap. In this way, most programs can run on most terminals. The/dev File System/dev directory contains the device files of all devices. Device Files are named according to specific conventions, which are described in the device list. The device files are generated by the system during installation and can be described in/dev/makedev later. /D e v/m a k e d e v. local is the description document written by the system administrator for the local device file (or connection) (for example, some non-standard device drivers are not part of the standard makedev ). The following describes some common files in/d e v. 1./dev/console, which is the monitor directly connected to the system. 2./dev/hd I d e hard drive 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 d. If there are other hard disks in the system, they are/d e v/h d B,/d e v/h d c ,......; if multiple partitions exist, they are h d a 1, h d a 2 ...... 3. /dev/sd s c s I Disk Driver Interface. If the system has a s c s I hard disk, it will not access/d e v/h a d, but/d e v/s d. 4./dev/fd driver. For example,/d e v/f d 0 indicates the first floppy disk of the system, which is usually referred to as a: disk, /d e v/f d 1 refers to the second floppy disk ,...... the/d e v/f d 1 h 1 4 4 0 indicates accessing 4 in drive 1. 5 high-density disks. 5./dev/st s c s I tape drive driver. 6./dev/tty provides support for the virtual console. For example,/d e v/t y 1 indicates the first virtual console of the system, and/d e v/t y 2 indicates the second virtual console of the system. 7./dev/pty supports remote logon to pseudo terminals. You must use the/d e v/p t y device when logging on to te l n e t. 8./dev/ttys computer serial interface. For d o s, it is the "c o m 1" port. 9./dev/cua computer serial interface, which is used with the modem. 10./dev/null "black hole". All information written to this device will disappear. For example, to hide the output information on the screen, you only need to input the output information to/d e v/n u l. /Usr File System/usr is a very important directory. Generally, this file system is large because all programs are installed here. /All files in usr are generally from the l I n u x release (d I s t r I B u t I o n ); locally installed programs and other things are stored in/usr/local, because you do not need to re-install all programs when upgrading the new system or release version. Many contents in the/usr directory are optional, but these functions make the user use the system more effective. /U s r can accommodate many large software packages and their configuration files. Some important directories are listed below (some less important directories are omitted ). 1./usr/x11r6 contains all executable programs, configuration files, and support files of the x wi n o w system. To simplify the development and installation of x, x files are not integrated into the system. X wi n d o w system is a powerful graphics environment that provides a large number of graphics tool programs. If you are familiar with microsoft wi n d o w s or m a c h I n o s h, you will not feel helpless about x wi n d o w system. 2./usr/x386 is similar to/u s r/x 11r6, but it is dedicated to x 11 release 5. 3./usr/bin contains almost all user commands, which are system software libraries. Some other commands are in/bin or/usr/local/bin. 4./usr/sbin includes unnecessary system management commands for the root file system, such as most service programs. 5. the/usr/man,/u s r/I n f o,/u s r/d o c directories contain all the manual pages, g n u information documents, and various other document files.. Each "section" of an online manual has two sub-directories. For example,/u s r/m a n 1 contains the source code of section 1 of the online manual (no formatted original file ), /u s r/m a n/c a t 1 contains the first formatted content. L The online manual is divided into nine sections: Internal commands, system calling, library functions, devices, file formats, games, macro software packages, system management, and core programs. 6./usr/include contains the header file of C language. These files end with. h and are used to describe the data structures, subprocesses, and constants used in C language programs. In order to maintain consistency, this should be put in/usr/lib, but it is always used. 7./usr/lib contains unchanged data files of programs or subsystems, including some s I t e-w I d e configuration files. The name l I B is from the library. The original library for programming also exists in/usr/lib. When you compile a program, the program will be connected to the library. Many programs store configuration files. 8. Put the software and other files locally installed in/usr/local. This is similar to/u s r. You may find some large software packages, such as t e x and e m a c s. /Var file system/var contains the data to be changed during normal system running. The directory size of the data is usually changed or expanded. In the original/v a r directory, some contents are in/u s r, but to keep the/u s r directory relatively stable, put the directories that need to be changed frequently in/v a r. Each system is specific, that is, it is not shared with other computers through the network. Some important directories are listed below (some less important directories are omitted ). 1./var/catman includes the formatted help (m a n) page. The source file of the Help Page usually exists in/u s r/m a n. Some m a n pages may have pre-formatted versions, exist in/u s r/m a n/c a t. Other m a n pages must be formatted when they are viewed for the first time. The formatted version exists in/var/man, so that others do not have to wait for formatting when looking at the same page. (/Var/catman is often cleared, just like clearing a temporary directory .) 2./var/lib stores the files to be changed when the system is running normally. 3./var/local stores variable data of programs installed in/usr/local (that is, programs installed by the system administrator ). Note: if necessary, other/var directories, such as/var/lock, will be used even for locally installed programs. 4./var/lock the file. Many programs follow the Convention of generating a locked file in/var/lock to support the use of a specific device or file. When other programs notice this locked file, they will no longer use this device or file. 5. /var/log the log (l o g) files of various programs, especially login (/var/log/wtmp log records all the logons and sales to the System) and syslog (/var/log/messages records store all core and system program information ). Files in/var/log often grow uncertain and should be cleared regularly. 6./var/run saves the information files about the system that are valid before the next system boot. For example,/var/run/utmp contains the information of the user currently logged on. 7. /var/spool place the directory of the "s p o l" program, such as the directory where m a I l, n e w s, print queue and other queues work. Each different s p o l has its own subdirectory under/var/spool. For example, the user's mailbox is stored in/var/spool/mail. 8./var/tmp allows larger or longer temporary files than/tmp. Note that the system administrator may not allow/var/tmp to have very old files. /Proc file system is a pseudo file system, that is, it is a directory that actually does not exist, so this is a very special directory. It does not exist on a disk, but is generated by the core in the memory. This directory is used to provide information about the system. The following describes some of the most important files and directories (the/proc file system has a more detailed description on the proc man page ). 1./proc/x information directory of process x, which is the ID of the process. Each process has a directory named its own process number under/proc. 2./proc/cpuinfo stores information about the processor (c p u), such as the type, manufacturer, model, and performance of c p u. 3./proc/devices list of device drivers with core configurations currently running. 4./proc/dma shows the currently used d m a channel. 5./proc/filesystems core configuration file system information. 6./proc/interrupts displays the information of the interrupted and occupied users and the number of occupied users. 7./proc/ioports current I/o port. 8./proc/kcore system physical memory image. It is identical to the physical memory size, but it does not actually occupy so much memory; it is created only when the program accesses it. (Note: Unless you copy it to somewhere, nothing in/proc occupies any disk space .) 9./proc/kmsg core Output Message. It will also be sent to s y s l o g. 10./proc/ksyms core symbol table. 11./proc/loadavg System "average load"; 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 the core modules currently loaded. 14./proc/net network protocol status information. 15./proc/self stores the symbolic connection to the process directory of the program you want to view/proc. When two processes view/proc, this will be a different connection. This allows the program to obtain its own process directory. 16. different states of the/proc/stat system, such as the number of page errors after the system starts. 17./proc/uptime system startup time. 18./proc/version core version.

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.