/dev Directory: Contains special device files which represent devices built into or connected to the system. The files represent byte-stream and block I/O devices
/home Directory: All personal, configuration, data, and executable progarams are placed under this directory. Subdirectories contain content for various groups and users. You can use $HOME or ~ to get to an user’s home directory.
/lib and /lib64 Directories: Contain libarries needed to execute the binaries in /bin and /sbin. These libaries are used for booting system and executing commands within root filesystem. Note: Some newer distributions just have one directory for lib and use symbolic links to preserve the two directories view.
/media Directory: Used to mount filesystems on removable media.
/mnt Directory: Use for temporarily mount a filesystem. Use for network filesystems like: NFS; Samba; CIFS; AFS.
/opt Directory: Designed for software packages that wish to keep all or most of their files in one isolated place. Directories: /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are reserved for local sys-admin use.
/sys Directory: The mount point for the sysfs pseudo-filesystem where all information resides only in memory. Empty for non-running system. sysfs is used to gather information about the system, and modify its behavior while running.
/root Directory: Home directory for root user.
/sbin Directory: Contains binaries essential for booting, restoring, recovering, and/or repairing to those in /bin directory.
/srv Directory: Contains site-specific data served by the system. Ubuntu and Red Hat has /srv empty by default.
To cancel policy for storing /tmp on disk, run:
sudo systemctl mask tmp.mount
Then follow by a system reboot.
/usr Directory: Can be thought of as a secondary hierarchy. Used for files not needed for system booting. Does not need to reside in the same partition as the root directory, and can be shared across a network. Software packages should not create subdirectories under /usr. Use symbolic links to other locations for compability. Typically only contains read-only data
/var Directory: Contaions variable data files that change frequently during system operation. These includes: log files; spool directories and files; administrative data files; temporary files such as cache contents.
Note: best practice to mount /var as a separate filesystem. /var/spool is for local files for processes such as mail, printing, and cronjobs.
/run Directory: Store transient files, files that contain runtime information. Generally implemented as an empty mount point, with a tmpfs ram disk (like /dev/shm) mounted there at runtime.
sudo du -shxc --exclude=proc * to show data usage of the directories.