linux /usr目錄

/usr

/usr usually contains by far the largest share of data on a system. Hence,this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc. X and its supporting libraries can be found here. User programs like telnet, ftp are also placed here. In the original Unix implementations, /usr was where the home directories of the users were placed (that is to say, /usr/someone was then the directory now known as /home/someone). In current Unices, /usr is where user-land programs and data (as opposed to 'system land' programs and data) are. The name hasn't changed, but it's meaning has narrowed and lengthened from "everything user related" to "user usable programs and data". As such, some people may now refer to this directory as meaning 'User System Resources' and not 'user' as was originally intended.

/usr/bin

This directory contains the vast majority of binaries on your system. Executables in this directory vary widely. For instance vi, gcc, gnome-session and mozilla and are all found here.

/usr/games

Once upon a time, this directory contained network games files. Rarely used now.

/usr/include

The directory for 'header files', needed for compiling user space source code.

/usr/lib

This directory contains program libraries. Libraries are collections of frequently used program routines.

/usr/local

The original idea behind '/usr/local' was to have a separate ('local') '/usr' directory on every machine besides '/usr', which might be just mounted read-only from somewhere else. It copies the structure of '/usr'. These days, '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs.The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.

/usr/sbin

This directory contains programs for administering a system, meant to be run by 'root'. Like '/sbin', it's not part of a user's $PATH. Examples of included binaries here are chroot, useradd, in.tftpd and pppconfig.

/usr/share

This directory contains 'shareable', architecture-independent files (docs, icons, fonts etc). Note, however, that '/usr/share' is generally not intended to be shared by different operating systems or by different releases of the same operating system. Any program or package which contains or requires data that doesn't need to be modified should store that data in '/usr/share' (or '/usr/local/share', if installed locally). It is recommended that a subdirectory be used in /usr/share for this purpose."

/usr/share/man

Manual pages. They are organized into 8 sections, which are explained below.

man1: User programs

Manual pages that describe publicly accessible commands are contained in this chapter. Most program documentation that a user will need to use is located here.

man2: System calls

This section describes all of the system calls (requests for the kernel to perform operations). 

man3: Library functions and subroutines

Section 3 describes program library routines that are not direct calls to kernel services. This and chapter 2 are only really of interest to programmers. 

man4: Special files

Section 4 describes the special files, related driver functions, and networking support available in the system. Typically, this includes the device files found in /dev and the kernel interface to networking protocol support.

man5: File formats

The formats for many data files are documented in the section 5. This includes various include files, program output files, and system files.

man6: Games

This chapter documents games, demos, and generally trivial programs.Different people have various notions about how essential this is. 

man7: Miscellaneous

Manual pages that are difficult to classify are designated as being section 7. The troff and other text processing macro packages are found here. 

man8: System administration

Programs used by system administrators for system operation and maintenance are documented here. Some of these programs are also occasionally useful for normal users.

/usr/src

The 'linux' sub-directory holds the Linux kernel sources, header-files and documentation.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章