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.

### 回答1: 在Linux系统中,/usr目录是一个重要的系统目录,它包含了用户安装的应用程序、库文件、文档、配置文件等等。通常情况下,/usr目录是只读的,只有系统管理员才有权限修改其中的内容。在Linux系统中,/usr目录的作用非常重要,它可以让用户方便地安装和管理各种应用程序,同时也可以保证系统的稳定性和安全性。 ### 回答2: 在Linux操作系统中,/usr目录是一个重要的文件目录,其作用如下: 1. 存储用户程序和应用:/usr目录下包含了大部分用户程序、应用和相关文件。用户可以安装软件包到该目录,并可在该目录下创建自己的子目录来组织自己的程序和脚本。 2. 系统的共享文件:/usr目录存放了系统的共享文件,如库文件、头文件、文档等。这些文件可供所有用户共享使用,使得不同用户之间能够方便地共享同一份文件,避免了重复拷贝。 3. 存储用户的家目录:用户的个人目录通常位于/usr目录下的子目录中。每个用户在此目录下有自己的私有空间,存储自己的文件、配置和数据。 4. 安装系统软件包:一些系统级的软件包可能会被安装到/usr目录下,比如编译器、解释器、系统管理工具等。 5. 存放系统文档:系统文档通常存放在/usr目录下,包括用户手册、帮助文档、软件说明等。这些文档可供用户参考和学习,帮助用户了解系统和应用的使用方法。 总而言之,/usr目录Linux系统中具有重要的功能和作用,它不仅存储了系统和应用的文件,还提供了用户个人空间和共享资源的管理和组织。 ### 回答3: 在Linux中,/usr目录是一个重要的系统目录,其作用是存储用户程序和数据,也可以理解为Unix Software Resource的缩写。 /usr目录下包含了系统级的应用程序和文件,如/usr/bin和/usr/sbin。/usr/bin目录存放了大多数用户级可执行的命令,比如ls和cp等常用命令。而/usr/sbin目录则存放了一些只允许系统管理员使用的系统管理命令,如systemctl和ifconfig等。 此外,/usr目录还包含了许多子目录,如/usr/include、/usr/lib和/usr/share。/usr/include目录存放了用于编译和链接的C/C++头文件。/usr/lib目录则存储了共享库文件,这些库文件可以被各种应用程序共享使用。/usr/share目录则用于存放共享数据,比如系统范围的配置文件、文档和帮助文件等。 总的来说,/usr目录作为一个分层次的目录系统,在Linux中扮演着非常重要的角色。它存放了许多用户和系统程序所需要的文件和数据,方便用户使用和操作系统的正常运行。通过/usr目录的合理组织与管理,可以更好地维护和扩展Linux系统,保证系统的稳定和安全性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值