在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, 了解它的历史和作用就好。

Unix/Linux中/usr目录的由来的更多相关文章

  1. linux中各目录及详细介绍

    一.Linux文件系统的层次结构 在Linux或UNIX操作系统中,所有的文件和目录都被组织成一个以根节点开始的倒置的树状结构,如图: 二.目录 1.目录的定义 目录相当于Windows中的文件夹,目 ...

  2. Linux中/proc目录下文件详解

    转载于:http://blog.chinaunix.net/uid-10449864-id-2956854.html Linux中/proc目录下文件详解(一)/proc文件系统下的多种文件提供的系统 ...

  3. Linux中/proc目录下文件详解(转贴)

      转载:http://www.sudu.cn/info/index.php?op=article&id=302529   Linux中/proc目录下文件详解(一) 声明:可以自由转载本文, ...

  4. Linux中 /boot 目录介绍 【转载】

    Linux中 /boot 目录介绍 转自:点击打开链接 一./boot/目录中的文件和目录 Linux系统在本地启动时,目录/boot/非常重要,其中的文件和目录有: (1)系统Kernel的配置文件 ...

  5. [转]unix/linux中的dup()系统调用

    [转]unix/linux中的dup()系统调用    在linux纷繁复杂的内核代码中,sys_dup()的代码也许称得上是最简单的之一了,但是就是这么一个简单的系统调用,却成就了unix/linu ...

  6. 关于linux中的目录配置标准以及文件基本信息

    关于Linux中的目录配置标准 在查看docker.k8的运行日志,修改相关的运行记录的时候,学长总是能很快地找到目录,这个多多少少和Linux的FHS(File Hierarchy Standard ...

  7. Linux中/usr与/var目录详解

    /usr文件系统 /usr 文件系统经常很大,因为所有程序安装在这里. /usr 里的所有文件一般来自Linux distribution:本地安装的程序和其他东西在/usr/local 下.这样可能 ...

  8. Linux中一些目录名称的含义

    挖Linux中的古老缩略语[2005-06-22 15:23][Nigel McFarlane][TechTarget] Unix已经有35年历史了.许多人认为它开始于中世纪,这个中世纪是相对于计算机 ...

  9. Linux中各个目录作用

    对于linux新手来说,最感到迷惑的问题之一就是文件都存在哪里呢?特别是对于那些从windows转过来的新手来说,linux的目录结构看起来有些奇怪哦.比如没有C盘,没有分盘符,一大堆不知道用途的文件 ...

随机推荐

  1. node.js 笔记

    教程总结笔记: 学习网站:http://www.runoob.com/nodejs/nodejs-install-setup.html Node.js 中文网及安装文件下载: http://nodej ...

  2. bean之间的继承和依赖关系

    继承Bean配置 Spring允许继承bean的配置,被继承的bean称为父bean,继承这个父Bean的Bean称为子Bean 子Bean从父Bean中继承配置,包括Bean的属性配置 子Bean可 ...

  3. dos 设置 Windows 网络命令

    dos 设置Windows 命令: netsh interface ip set address name="本地连接" source=static addr=172.16.12. ...

  4. 【通信】JDK中的URLConnection参数详解

    JDK中的URLConnection参数详解 来自:http://www.blogjava.net/supercrsky/articles/247449.html 针对JDK中的URLConnecti ...

  5. python - 数据描述符(class 内置 get/set/delete方法 )

    数据描述符(class 内置 get/set/del方法 ): # 什么是描述符 # 官方的定义:描述符是一种具有“捆绑行为”的对象属性.访问(获取.设置和删除)它的属性时,实际是调用特殊的方法(_g ...

  6. STM32 变量无法赋值问题

    STM32 在用JLink 调试的时候发现有一条将unsigned char赋值给int的语句始终不能执行,int类型变量的值始终为0: 查资料找到这个问题是编译器优化的原因,也就是说由于编译器优化, ...

  7. SpringBoot整合日志

    Java日志 日志的接口层.抽象层 日志的实现 JCL(Jakarta Commons Logging) SLF4J(Simple Logging Facade for Java) Jboss-Log ...

  8. C++获取当前所有进程的完整路径

    实现代码 #include <stdio.h> #include <windows.h> #include <tlhelp32.h> #include <st ...

  9. openwrt 分区

    下面以ar9344 16M flash为例子: uboot启动时传递给内核的参数为: bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 ...

  10. zabbix监控短信息接口是否正常

    1.创建Web scenarios 2.创建zabbix触发器name:short_message send status is not 100 Expression:{u04zbx01.yaya.c ...