A detailed explanation of USR directory in Linux system

Source: Internet
Author: User
Tags documentation

Linux file structure, there is a very magical directory--/usr. has not been how to pay attention to it before, anyway, the program is installed in the inside, and there is nothing to be traced to things. Until one day, fedora to simplify the entire filesystem system, see the discussion to think, what is the abbreviation of USR, what is it? In the discussion, most of the views were that:

1.USR is the abbreviation for UNIX system resources;
2.USR is the abbreviation of user;
3.USR is the abbreviation for UNIX software resources.

Judging by common sense, the user abbreviation is unlikely, because the conflict with/home. But the abbreviation for system resources or software resources is really hard to say. I checked a lot of things, but found that even Wikipedia is ambiguous. /usr is the core of the Linux system and contains all the shared files.

It is one of the most important directories in UNIX systems, covering binary files, various documents, various headers, x, and various library files, as well as many programs, such as ftp,telnet and so on.

The once/usr or user's home directory, which holds various user files, has now been replaced by/home (for example,/usr/someone has been changed to/home/someone).

Modern/usr only stores a variety of programs and data, and the user directory has been transferred. Although the/USR name has not changed, its meaning has changed from "User directory" to "Unix system resources" directory. It is noteworthy that on some UNIX systems,/usr/someone is still treated as a user's home directory, such as Minix.

The/usr file system is often large because all programs are installed here. All files in/usr are typically from Linux distribution, locally installed programs and other things under/usr/local. This may not be necessary to reinstall the entire program when upgrading a new system or a newer distribution.

Because the files in/usr are not related to a particular computer and are not modified in common use, this directory can be shared over the network (file system) so that when the administrator installs the new software, all computers that share the file system can use the new software.

At this point, the truth. It looks like a while ago/var/run moved to/run.

Really is not to see do not know, a look scared jump ah. Linux has evolved several years, the birth and use of many catalogs has produced a fundamental change.

/USR directory structure

/usr/bin: All executables, such as Gcc,firefox, which are not included in/sbin and/bin;

/usr/include: All kinds of header files, compile files, etc. need to use;

/usr/include/' package-name ': A program-specific header file;

/usr/lib: So the library file required for the executable file;

/usr/local: This is mainly for those software that is installed manually, that is, software that is not installed through the "new stand" or apt-get. It has a similar directory structure as the/usr directory. I think it would be a good idea to have the Package Manager manage the/usr directory and put the custom script (scripts) under the/usr/local directory.

/USR/X11R6:X system binaries, library files, documents, fonts, etc. It is not equivalent to/usr, only X can invoke these library files, and other programs are not read or used. Because Linux does not have a native graphical interface, and Linux is mostly for server, the graphical interface is meaningless, where X11R6 represents version 6;

A/usr/x11r6/bin:x binary file that contains the necessary files to run X;

/usr/x11r6/include:x Related header file;

/usr/x11r6/lib:x library files;

/USR/X11R6/LIB/MODULES:X module, loading at startup. Lack of video4linux, DRI and GLX and input modules will not work properly;

Font file for/usr/x11r6/lib/x11/fonts:x font server;

/usr/doc: Documentation. The actual is/usr/share/doc soft link;

/USR/ETC: A rarely used configuration file storage;

/usr/games: Once included games and other documents, now rarely used;

/usr/info: System related information, is the soft link of/usr/share/info;

/usr/man:man Handbook, has been moved to/usr/share/man;

/usr/sbin: Similar/sbin,root can be performed. But this directory is not included in the environment variable $PATH, it contains programs similar to Chroot, Useradd, in.tftpd and Pppconfig;

/usr/share: It contains shared files among various programs, such as fonts, icons, documents, and so on. (/usr/local corresponds to the directory is/usr/loca/share);

/usr/share/doc: Man handbook for similar applications. It contains the program's description file, the default configuration file, and so on;

/usr/share/info: Not commonly used, has been replaced by man;

The Manual of/usr/share/man:app;

/usr/share/icons: The application icon and other files, divided into png,svg and other formats;

/usr/share/fonts: Font file, System-wide usable, ~/.fonts only available to current users;

/usr/src:linux kernel source code and documentation, etc.;

/usr/src/linux:linux source code;

/usr/src/linux/.config: A file generated by the kernel compilation process, usually produced by the command ' make config ', ' make menuconfig ', or ' make xconfig ' execution;

/usr/src/linux/.depend,/usr/src/linux/.hdepend: ' Make DEP ' detects files needed to compile dependencies, generated by/usr/src/linux/.config;

/USR/SRC/LINUX/COPYING:GNU license;

/usr/src/linux/makefile: The Makefile required to compile the kernel;

/usr/src/linux/rules.make: When there are multiple Makefile, execute make according to its rules;

/usr/tmp: A temporary folder that has been discarded by numerous distributions.

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.