加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Unix/Linux中/usr目录简介

发布时间:2016-10-15 01:52:46 所属栏目:Linux 来源:网络整理
导读:在Linux系统中,有一个很重要的目录/usr目录。关于这个目 录名称的由来,网上主要有下面几种说法: user的缩写 User Shareable Read-only的缩写 Unix/User Syst

在Linux系统中,有一个很重要的目录——/usr目录。关于这个目 录名称的由来,网上主要有下面几种说法:

user的缩写

User Shareable Read-only的缩写

Unix/User System Resources的缩写

Unix/User Software Resources的缩写

目前大多数版本的Linux中/usr目录主要放置的是可执行文件和先关库文件, 因此user好像不太可能。

查阅了相关的资料,关于/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, etc.... 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 is shareable, read-only data. That means that /usr should be

shareable between various FHS-compliant hosts and must not be written

to. Any information that is host-specific or varies with time is

stored elsewhere.

Large software packages must not use a direct subdirectory under the

/usr hierarchy.

/usr目录存放了系统中重要的二进制文件,文档,库文件,头文件等等。在 早起的Unix版本中,/usr目录是作为用户的家目录而存在的(相当于现在的/home 目录),因此这个目录的名字最开始应该是user的缩写,表示用户的家目录。而 现在的Unix版本中,/usr目录的作用已经大不相同了,主要存放的是一些非系统 启动必要的程序和数据。因此一些人把/usr目录的含义引申为User System Resources.

/usr目录存放共享的,只读的数据。这意味着/usr应该是可以在兼容FHS标准 的主机间共享的,并且其中的数据是不应该被修改的。那些与主机属性相关或者 经常变动的数据不应该存放在次目录。

大型的软件包不要使用/usr下的子目录存放。

由此以来,/usr目录的由来就真相大白了。你可以称之为User System Resources或者User Shareable Read-only. Whatever, 了解它的历史和作用就好 。

本栏目更多精彩内容: http://www.bianceng.cn/OS/Linux/

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读