linux 系统中的 /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin 目录的区别

英文版:

/bin 
This directory contains executable programs which are needed in single user mode and to bring the sys‐ tem up or repair it.

/sbin 
Like /bin, this directory holds commands needed to boot the system, but which are usually not executed by normal users.

/usr/bin 
This is the primary directory for executable programs. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory.

/usr/sbin 
This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair.

/usr/local/bin 
Binaries for programs local to the site.

/usr/local/sbin 
Locally installed programs for system administration.

中文版:

/bin  存放所有用户皆可用的系统程序,系统启动或者系统修复时可用(在没有挂载 /usr 目录时就可以使用)

/sbin 存放超级用户才能使用的系统程序

/usr/bin 存放所有用户都可用的应用程序

/usr/sbin 存放超级用户才能使用的应用程序 
/usr/local/bin 存放所有用户都可用的与本地机器无关的程序
/usr/local/sbin 存放超级用户才能使用的与本地机器无关的程序

搞笑版:

本来这些个目录都在一起的,后来直到有一天:
Unix开发者的机器的硬盘不够了,新加了一块,挂在/usr上;
又TM不够了,再加一块,挂在/usr/local上;
不知怎么,就变成规范了。。。。

转载自:https://www.cnblogs.com/smallrookie/p/7089008.html

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 大部分的后端会很很鄙视前端。我也不知道为什么,可能大部分人都会觉得脚本语言根本不算语言。 大多人 会叫我们切图仔,...
    小黑的眼阅读 3,589评论 0 15
  • 风浪自两年前埋下一刻隐秘的种子, 一年抽芽,半年锢住我的双脚, 如今累成一个茧,将我裹在其中, 慢慢地收紧,蚕食着...
    顾北清歌暖阅读 204评论 1 5

友情链接更多精彩内容