Introduction to the usr directory in Linux

  
                

In the Linux system file structure, there is such a magical directory that is usr. I haven't paid attention to it before, anyway, the program has been installed inside, I don't know where to put it. Where is fedora to simplify the whole file system, only to see its existence, usr What is the abbreviation, and how did it come about? Here Xiaobian wants to tell you about the usr directory in the Linux system. The following also lists the functions of the files contained in some important subdirectories under the usr directory. Users who need it can refer to the study.

1.usr abbreviation is unix system resources;

2.usr is an abbreviation of a user;

3.usr abbreviation is unix software resources.

Judging by common sense, it is unlikely that the user abbreviation is because it conflicts with /home. But the abbreviation of system resources or software resources is really hard to say. I have checked a lot of things, but I 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 the Unix system, covering binary files, various documents, various header files, x, and various library files; there are also many programs, such as ftp, telnet and many more.

The previous /usr is also the 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 various 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 the "unix system resource" directory. It's worth noting 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 usually from the Linux distribution; locally installed programs and other things are under /usr/local. This may not require reinstalling the entire program when upgrading a new system or a new distribution.

Since the files in /usr are not related to a specific computer, they will not be modified in normal use, so this directory (file system) can be shared over the network, so that when the administrator installs new software After that, all computers sharing this file system can use the new software.

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

I really don’t know what to expect. It turns out that Linux has evolved a lot, and the birth and use of many directories has produced fundamental changes.

/usr Directory Structure

/usr/bin : All executable files, such as gcc, firefox, etc. (not included in /sbin and /bin);

/usr/include : Various header files, when compiling files, etc.;

/usr/include/’package-name’ : program-specific header files;

/usr /lib : So the library files needed for the executable;

/usr/local : This is mainly for those software that are installed manually, that is, software that is not installed by "New Orle" or apt-get . It has a similar directory structure to the /usr directory. Let the package manager manage the /usr directory and put the custom scripts under the /usr/local directory. I think this should be a good idea.

/usr/X11R6 : x System binary files, library files, documents, fonts, etc. It is not equivalent to the role of /usr, only x can call these library files, etc., other programs do not read or use. Because Linux does not have a native graphical interface, and Linux is mostly for server, the graphical interface has no meaning; X11R6 stands for version 11 release 6;

/usr/X11R6/bin : x binary, Contains the necessary files to run x;

/usr/X11R6/include : x related header files;

/usr/X11R6/lib : x library files;

/Usr/X11R6/lib/modules : The module for x, loaded at startup. Lack of video4linux, DRI and GLX and I/O device modules will not work properly;

/usr/X11R6/lib/X11/fonts : x font server font files;

/usr/Doc : documentation. Actually a soft link to /usr/share/doc;

/usr/etc : a rarely used configuration file;

/usr/games : once included games and other files , rarely used now;

/usr/info : system related information, is a soft link to /usr/share/info;

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

/usr/sbin : Similar to /sbin, root can be executed. However, 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 between various programs. Such as fonts, icons, documents, etc. (The directory corresponding to /usr/local is /usr/loca/share);

/usr/share/doc : Man's manual for similar applications. It contains the program's documentation, default configuration files, etc.;

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

/usr/share/man : app's manual;

/usr/share/icons : Icons such as application icons, such as png, svg, etc.;

/usr/share/fonts : font files, system-wide Use, ~/.fonts is only available to the current user;

/usr/src : source code and documentation for the Linux kernel;

/usr/src/linux :Linux source code;

/usr/src/linux/.config : The file generated by the kernel compilation process; usually generated by the command ‘make config’ , ‘make menuconfig’ or ‘make xconfig’ after execution;

/usr/src/linux/.depend, /usr/src/linux/.hdepend : ‘make dep’ Check the files needed to compile dependencies, generated by /usr/src/linux/.config;

/usr/src/linux/COPYING : GNU license;

/usr/src/linux/Makefile : Makefil required to compile the kernel e;

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

/usr/tmp : has been abandoned by many distributions Temporary folder.

The above is the introduction of the usr directory in the Linux system, now I know it! All the files in usr are usually from the Linux system, so let's learn more! It’s also good to grow your knowledge!

Copyright © Windows knowledge All Rights Reserved