linux中bin与sbin目录的作用及区别介绍
在linux系統(tǒng)中,有兩個(gè)重要的目錄:bin與sbin,分別包括/bin、/usr/bin/與/sbin、/usr/sbin/。?
bin:?
bin為binary的簡(jiǎn)寫(xiě),主要放置系統(tǒng)的必備執(zhí)行文件,例如:?
cat、cp、chmod df、dmesg、gzip、kill、ls、mkdir、more、mount、rm、su、tar等。?
/usr/bin:?
主要放置應(yīng)用程序工具的必備執(zhí)行文件,例如:?
c++、g++、gcc、chdrv、diff、dig、du、eject、elm、free、gnome*、 gzip、htpasswd、kfm、ktop、last、less、locale、m4、make、man、mcopy、ncftp、 newaliases、nslookup passwd、quota、smb*、wget等。?
/sbin:?
主要放置系統(tǒng)管理的必備程序,例如:?
cfdisk、dhcpcd、dump、e2fsck、fdisk、halt、ifconfig、ifup、 ifdown、init、insmod、lilo、lsmod、mke2fs、modprobe、quotacheck、reboot、rmmod、 runlevel、shutdown等。?
/usr/sbin:?
主要放置網(wǎng)路管理的必備程序,例如:?
dhcpd、httpd、imap、in.*d、inetd、lpd、named、netconfig、nmbd、samba、sendmail、squid、swap、tcpd、tcpdump等
/bin,/sbin,/usr/bin,/usr/sbin區(qū)別
/? : this is root directory? ? ? ? ? ? ? ? root 用戶(hù)根目錄
/bin : commands in this dir are all system installed user commands? ? 系統(tǒng)的一些指令
/sbin:? commands in this dir are all system installed super user commands? 超級(jí)用戶(hù)指令 系統(tǒng)管理命令,這里存放的是系統(tǒng)管理員使用的管理程序?
/usr/bin: user commands for applications? 后期安裝的一些軟件的運(yùn)行腳本
/usr/sbin: super user commands for applications? 超級(jí)用戶(hù)的一些管理程序
/usr/X11R6/bin : X application user commands
/usr/X11R6/sbin: X application super user commands
Linux 中的某些重要的目錄:
?主目錄:/root、/home/username
?用戶(hù)可執(zhí)行文件:/bin、/usr/bin、/usr/local/bin
?系統(tǒng)可執(zhí)行文件:/sbin、/usr/sbin、/usr/local/sbin
?其他掛載點(diǎn):/media、/mnt
?配置:/etc
?臨時(shí)文件:/tmp
?內(nèi)核和Bootloader:/boot
?服務(wù)器數(shù)據(jù):/var、/srv
?系統(tǒng)信息:/proc、/sys
?共享庫(kù):/lib、/usr/lib、/usr/local/lib
?
每個(gè)用戶(hù)都擁有一個(gè)主目錄。所有用戶(hù)的個(gè)人文件(配置、數(shù)據(jù)甚至應(yīng)用程序)都放在其中。根的主目錄為/root。大多數(shù)非根主目錄包含在 /home 樹(shù)中,通常以用戶(hù)命名。重要的二進(jìn)制位于 /bin(用戶(hù)二進(jìn)制)以及 /sbin(系統(tǒng)二進(jìn)制)中。不重要的二進(jìn)制(如圖形環(huán)境或Office 工具)安裝在 /usr/bin 和 /usr/sbin中。進(jìn)行這種分隔是為了盡可能地縮小根分區(qū)。使用源代碼編譯的軟件通常位于 /usr/local/bin 和 /usr/local/sbin中。
總結(jié)
以上是生活随笔為你收集整理的linux中bin与sbin目录的作用及区别介绍的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 铁将军阿贵剧情介绍
- 下一篇: Linux进程间通信方式--本地sock