ความแตกต่างของ /bin, /sbin, /usr/bin, /usr/sbin ใน Linux

/**
this is root directory */

/** / : this is root directory */

/** /bin : commands in this dir are all system installed user commands */

/** /sbin: commands in this dir are all system installed super user commands */

/** /usr/bin: user commands for applications */

/** /usr/sbin: super user commands for applications */

/** /usr/local/bin : application user commands */

/** /usr/local/sbin: application super user commands */


1.

Linux /bin, /sbin, /usr/bin, /usr/sbin 区别, CSDN Blog-IT-Homer:http://blog.csdn.net/ithomer/article/details/9839957↩

ใน Linux ไดเรกทอรีเหล่านี้จะถูกจัดแบ่งเพื่อให้สอดคล้องกับลักษณะของคำสั่งและผู้ที่ใช้งาน โดยสรุปได้ดังนี้

  • / คือ root directory
  • /bin: คำสั่งในไดเรกทอรีนี้เป็นคำสั่งของระบบที่ติดตั้งไว้สำหรับผู้ใช้งาน (user commands)
  • /sbin: คำสั่งในไดเรกทอรีนี้เป็นคำสั่งของระบบที่ติดตั้งไว้สำหรับซูเปอร์ยูสเซอร์/ผู้ดูแลระบบ (super user commands)
  • /usr/bin: คำสั่งสำหรับผู้ใช้งานของแอปพลิเคชัน
  • /usr/sbin: คำสั่งสำหรับซูเปอร์ยูสเซอร์/ผู้ดูแลระบบของแอปพลิเคชัน
  • /usr/local/bin: คำสั่งสำหรับผู้ใช้งานของโปรแกรมที่ติดตั้งในเครื่อง (local)
  • /usr/local/sbin: คำสั่งสำหรับซูเปอร์ยูสเซอร์/ผู้ดูแลระบบของโปรแกรมที่ติดตั้งในเครื่อง (local)