#Filesystem Hierarchy Standard

standard ref

This standard consists of a set of requirements and guidelines for file and directory placement under UNIX-like operating systems. The guidelines are intended to support interoperability of applications, system administration tools, development tools, and scripts as well as greater uniformity of documentation for these systems.

##General setting

###under /

/bin : Essential user command binaries (for use by all users). /sbin : System binaries. stored in /sbin, /usr/sbin, and /usr/local/sbin. /lib : Essential shared libraries and kernel modules lib32 and lib64: Alternate format essential shared libraries (optional) /etc : Host-specific system configuration. A “configuration file” is a local file used to control the operation of a program; it must be static and cannot be an executable binary.

/media : Mount point for removable media /mnt : Mount point for a temporarily mounted filesystem /opt : Add-on application software packages /run : Run-time variable data /srv : Data for services provided by this system /tmp : Temporary files

###/usr

TEXT
/
└── usr
    ├── bin
    ├── include
    ├── lib
    ├── sbin
    ├── share
    └── src

/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.
Large software packages must not use a direct subdirectory under the /usr hierarchy. (maybe /opt)

And others:

###Summary

shareable unshareable
static /usr, /opt /etc, /boot
variable /var/mail, /var/spool/news /var/run, /var/lock
TEXT
├── bin # binary
├── lib # library
├── include # C header
├── games   # games
├── opt # opt
├── share   # data that share with other
└── src     # sources
TEXT
/
├── boot
├── etc # configraturation
├── dev
├── media
├── mnt
├── proc
├── run
├── srv
├── sys
└── tmp

##On archlinux,

TEXT
/
├── bin ⇒ usr/bin
├── boot
├── dev
├── etc
├── home
├── lib ⇒ usr/lib
├── lib64 ⇒ usr/lib
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin ⇒ usr/bin
├── srv
├── sys
├── tmp
├── usr
└── var

lib32 and lib64 for 32-bit and 64-bit. sbin binaries for super user. (On debian, only root can reboot.)

TEXT
/
└── opt
    ├── waterfox
    ├── wechat-universal
    └── wemeet
TEXT
/
└── usr
    └── share
        ├── alsa
        ├── applications
        ├── awk
        ├── blueman
        ├── mime
        ├── nvim
        ├── wayland
        ├── wayland-sessions
        ├── X11
        └── zsh
TEXT
/
└── usr
    └── local
        ├── bin
        ├── etc
        ├── games
        ├── include
        ├── lib
        ├── man
        ├── sbin
        ├── share
        └── src
TEXT
/
└── var
    ├── cache
    ├── db
    ├── empty
    ├── games
    ├── lib
    ├── local
    ├── lock ⇒ ../run/lock
    ├── log
    ├── mail ⇒ spool/mail
    ├── opt
    ├── run ⇒ ../run
    ├── spool
    └── tmp

###special directories

TEXT
/
├── boot
│   ├── efi
│   ├── grub
│   ├── initramfs-linux.img
│   └── vmlinuz-linux
├── dev
│   ├── disk
│   ├── null
│   ├── random
│   └── zero
├── mnt
├── proc
│   ├── 1
│   ├── uptime
│   └── zoneinfo
├── run
│   ├── dhcpcd
│   ├── initramfs
│   ├── media # This is different
│   ├── libvirt
│   ├── systemd
│   └── xtables.lock
├── srv
│   ├── ftp
│   └── http
├── sys
│   ├── kernel
│   └── power
└── tmp

##homes

TEXT
/
├── home
│   └── user
│       ├── Desktop
│       ├── Documents
│       ├── Downloads
│       ├── Music
│       ├── Pictures
│       ├── Public
│       ├── Templates
│       └── Videos
└── root
    ├── Desktop
    ├── Documents
    ├── Downloads
    ├── Music
    ├── Pictures
    ├── Public
    ├── Templates
    └── Videos