文章来源:

https://blog.csdn.net/qq_22771739/article/details/83933473

Linux 的软件安装目录是也是有讲究的,理解这一点,在对系统管理是有益的

/usr系统级的目录,可以理解为C:/Windows//usr/lib理解为C:/Windows/System32

/usr/local用户级的程序目录,可以理解为C:/Progrem Files/用户自己编译的软件默认会安装到这个目录下。

/opt用户级的程序目录,可以理解为D:/Software,opt有可选的意思,这里可以用于放置第三方大型软件(或游戏),当你不需要时,直接rm -rf掉即可。在硬盘容量不够时,也可将/opt单独挂载到其他磁盘上使用。

源码放哪里?
/usr/src系统级的源码目录。

/usr/local/src用户级的源码目录。

-----------------翻译-------------------

/opt

Here’s where optional stuff is put. Trying out the latest Firefox beta? Install it to /opt where you can delete it without affecting other settings. Programs in here usually live inside a single folder whick contains all of their data, libraries, etc.
这里主要存放那些可选的程序。你想尝试最新的firefox测试版吗?那就装到/opt目录下吧,这样,当你尝试完,想删掉firefox的时候,你就可 以直接删除它,而不影响系统其他任何设置。安装到/opt目录下的程序,它所有的数据、库文件等等都是放在同个目录下面。
举个例子:刚才装的测试版firefox,就可以装到/opt/firefox_beta目录下,/opt/firefox_beta目录下面就包含了运
行firefox所需要的所有文件、库、数据等等。要删除firefox的时候,你只需删除/opt/firefox_beta目录即可,非常简单。



/usr/local

This is where most manually installed(ie. outside of your package manager) software goes. It has the same structure as /usr.
It is a good idea to leave /usr to your package manager and put any
custom scripts and things into /usr/local, since nothing important
normally lives in /usr/local.


这里主要存放那些手动安装的软件,即不是通过“新立得”或apt-get安装的软件。
它和/usr目录具有相类似的目录结构。让软件包管理器来管理/usr目录,而把自定义的脚本(scripts)放到/usr/local目录下面,我想这应该是个不错的主意。

 

最新文章

  1. JavaScript之ES6
  2. kettle 使用JAVA代码进行执行
  3. Node.js与Sails~中间查询语言Waterline
  4. SQLSERVER 表名数据库名作为变量 必须使用动态SQL(源自网络)
  5. Apache Mina 2.x 框架+源码分析
  6. 再关于IE11
  7. hdu1016Prime Ring Problem
  8. 使用OVS
  9. 别说你不知道java中的包装类,wrapper type,以及容易在自动拆箱中出现的问题
  10. C++调用java
  11. android AVD 启动时报错
  12. Axure PR的使用
  13. Django多表操作
  14. C++学习(三十五)(C语言部分)之 单链表
  15. 【xsy2272】 与运算 状压dp
  16. ThinkPHP3.2.3使用分页
  17. elasticsearch6.4 memory locking requested for elasticsearch process but memory is not locked
  18. 87. Scramble String *HARD* 动态规划
  19. OpenGL ES 3.0 图元装配
  20. Ice_cream’s world II(最小树形图,加虚点)

热门文章

  1. STL关联容器值hashtable
  2. js转换后台接受的日期格式
  3. TensorFlow 解决“ImportError: Could not find 'cudnn64_6.dll'”
  4. Django - Xadmin (四) Filter
  5. IE, Chrome和Firefox浏览器 差异对比
  6. js中的函数声明置顶
  7. eclipse codeFormatter 和 codeTemplates 模板
  8. 行人重识别(ReID) ——概述
  9. ZYNQ系列
  10. AD转换为KiCAD的方法