| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| path-usr [May 14, 2026 at 11:38] – external edit 127.0.0.1 | path-usr [June 13, 2026 at 03:13] (current) – created - external edit 127.0.0.1 |
|---|
| # /usr | # /usr |
| | **/usr** is the secondary hierarchy and holds the bulk of the system's installed software. On a fresh install the majority of disk space under `/` is consumed by `/usr`. It mirrors the top-level structure: `/usr/bin` for user binaries, `/usr/lib` for libraries, `/usr/sbin` for admin tools, `/usr/share` for architecture-independent data, and `/usr/include` for C header files. The constraint that applies to `/bin` and `/lib` (must be available before other filesystems mount) does not apply here: `/usr` can be a separate partition or even a network mount. |
| | |
| | ``` |
| | /usr/bin/ all user-facing binaries not needed during early boot |
| | /usr/sbin/ all admin binaries not needed during early boot |
| | /usr/lib/ shared libraries for /usr/bin and /usr/sbin |
| | /usr/include/ C and C++ header files (installed by -dev packages) |
| | /usr/share/ architecture-independent data: man pages, icons, locale data |
| | /usr/share/man/ manual pages |
| | /usr/share/doc/ package documentation |
| | /usr/local/ locally installed software, outside the package manager |
| | /usr/local/bin/ binaries installed by the local administrator |
| | ``` |
| | |
| | `/usr/local/` is reserved for software installed by the sysadmin rather than the distribution's package manager. It has the same subdirectory layout (`bin/`, `lib/`, `include/`, `share/`) and by convention takes precedence in `$PATH` over `/usr/bin`. Installing a custom build of a tool to `/usr/local/bin` overrides the system version without modifying anything the package manager owns. |
| | |
| | On distributions with merged `/usr`, the top-level `/bin`, `/lib`, and `/sbin` are symlinks into `/usr`, making `/usr/bin` the single authoritative location for all binaries. |
| |
| - [[path-usr-bin|/usr/bin]] | |
| - [[path-usr-include|/usr/include]] | |
| - [[path-usr-lib|/usr/lib]] | |
| - [[path-usr-share|/usr/share]] | |
| - [[path-usr-src|/usr/src]] | |