System-wide directories
Essential system binaries such as
ls,
cp, and
bash.
Essential system binaries for administrative tasks such as
fsck and
reboot.
Contains most user utilities and applications.
/usr/bin: user binaries such as Vim and Python./usr/sbin: administrative binaries./usr/lib: libraries used by programs in/usr/binand/usr/sbin./usr/local: manually compiled or locally installed software.
Self-contained third-party or proprietary software, for example Google Chrome or MATLAB.
System and application configuration files, for example
/etc/hosts and
/etc/passwd.
Essential shared libraries required by programs in
/bin and
/sbin.
Variable data such as logs, caches, and changing application files.
/var/log: system logs such as syslog and auth.log./var/www: web server files.
User-specific directories
Home directories for normal users, for example
/home/user.
User-specific applications and application data.
~/.local/bin: executables installed for one user.~/.local/share: user-specific application data.
A user-created location for personal scripts or programs.
Device and system directories
Device files such as /dev/sda
for disks and /dev/null.
A virtual filesystem that exposes information about running processes.
A virtual filesystem used for system and hardware information.
Common mount points for filesystems.
/mnt: temporary mounts./media: removable media such as USB drives.
Boot-related files such as kernels and the GRUB bootloader.
Temporary files. The original note describes these as being cleared on reboot.
Special directories
Home directory for the root user.
Runtime data such as process IDs and sockets.
Quick decision table for file placement
A compact reference from the original note for choosing a common location based on the purpose of the file or software.
| Purpose | Directory |
|---|---|
| System-critical binaries |
/bin,
/sbin
|
| System-wide software, managed |
/usr/bin,
/usr/lib
|
| System-wide software, manual | /usr/local |
| Standalone or proprietary software | /opt |
| Configurations | /etc |
| Logs | /var/log |
| Temporary files | /tmp |
| User-specific software |
~/.local/bin,
~/bin
|
| User home files | /home/<username> |