Overview

a brief introduction

  1. bin - user binary
  2. boot - boot loader
  3. dev - device (manipulate your hard drives)
  4. etc - config files
  5. home - user home dir except root
  6. initrd.img
  7. lib - system library
  8. lib64
  9. lost+found
  10. media - removable devices (CD, USB etc)
  11. mnt - mount file systems
  12. opt - optional (eg. desktop environment)
  13. proc - process info
  14. root - root user’s home
  15. run
  16. sbin - system binary (runnable only by root)
  17. srv - service data
  18. sys
  19. tmp - temporary (delete on restart)
  20. usr - Unix System Resources (user programs)
    1. usr/bin - user programs
    2. usr/lib - user system lib
    3. usr/local - programs that’s manually compiled rather than install from package
    4. usr/sbin - root programs
  21. var - variables, application data (eg. MySQL db, cached files)

Reference: Linux Directory Structure (File System Structure) Explained with Examples1

Some important folders

bin, sbin, usr/bin, usr/sbin

bin/ stores commands needed during boot-up that might be needed by normal users. eg. cat, tar…

Applications such as Firefox are stored in /usr/bin, while important system programs and utilities such as the bash shell are located in /bin.

sbin/ is like bin but commands are not intended for normal users. Commands run by LINUX. eg. ifconfig, fdisk…

/usr/bin is all user commands, while /usr/sbin is system admin commands not needed on the root filesystem. e.g. most server programs.

proc

This filesystem is not on a disk. Exists in the kernels imagination (virtual).

It holds information about kernel parameters and system configuration.

usr

/usr usually contains by far the largest share of data on a system. Hence, this is one of the most important directories in the system as it contains all the user binaries, their documentation, libraries, header files, etc….

Reference: Linux Directory Structure

A brief history

Originally, there was /bin for programs, /dev for device files and /lib for extra executable code and /usr for user data.

The source code was also often provided somewhere under /usr.

And there were a few files in the operating system that didn’t fit in any of the existing categories. This included a passwd file containing users’ passwords, and an mtab file written by mount.

At first, there was no connotation that files in /etc were configuration files. In these very early days, if you wanted to customize something, you’d be recompiling that part of the system. As Unix got more powerful, there were more and more things you could do without recompiling. As Unix got used more widely, there were more and more things people wanted to do, and they found ways of doing them without going through the trouble of recompiling.

So /etc filled up with more and more text files that people could and did customize, hence it gradually became the configuration directory.

With the creation of /sbin to contain programs intended only for the system administrator, /etc ended up containing only text files, many of which can be customized by the system administrator.

Reference: Answer by Gilles on StackExchange