What's the difference of /bin, /sbin, /usr/bin, /usr/sbin on macOS?

139 阅读1分钟

The four directories are inherited from traditional UNIX filesystem

pathdescription
/binessential command-line binaries such as cat, cp, which are needed to mount /usr or to run in one-user mode.
/sbinessential system binaries which needed to start, maintain and recover the system, eg. mount, unmount, launchd.
/usr/non-essential command-line binaries, libraries, header files, and other data.
/usr/binnon-essential command-line binaries such as which, whereis.
/usr/sbinNon-essential system binaries such as sshd, sysctl.