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上;
不知怎么,就變成規范了。。。。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM