The FileSystem Hierachy

Updated: Sep 22, 2026

File Classification

While none of what will be describe are absolute as many developers and distributors tend to interpret where things should live in their own way. For which there are good reasons. However, this should give a base understanding. And of course there is a governing body that tries to set the standard if not always strictly followed.

Throughout my lessons, I will attempt to relocate files or create links that most commonly match where files are commonly located.

Just the same. On any computer you have files of all sorts of types and classification. At the highest level you have 4 broad classes.

  1. Programs, executables, or commands historically called Binaries because in the early days for a program to run it needed to be converted into a binary machine language.
  2. Configuration Files. Text files that were read by the programs that setup or changed the how programs ran.
  3. Dependencies or Libraries. Many programs share common pieces of code, these programs reference what we call Libraries
  4. Things that change. When programs run often times they write data of course when they do the file changes.

First Order Hierachy

Your first order of Binaries are /bin (just called the bin directory) the programs for normal users of the system. Then you have /sbin (called S Bin) which is where programs for the system and systems administrators would live. These files should only change when there is a code update.

In the /etc directory (while short for etcetera meaning "the rest", in computers we pronounce it etsy), you have the system configuration files and startup scripts. These files tend to be host specific.

The /lib directory (short for libraries but simply called lib) contains the code references and dependencies. Like the /bin directories, these should only change when there are code updates. However, I have seen some programs use /lib when the should use /var.

The /var directory (short for variable files but simply called var) contains logs, database files, cache files and other things that change regularly.

  • /bin - Essential User Binaries
  • /sbin - Essential System Binaries
  • /etc - Systems Specific Configurations and Scripts
  • /lib - Essential Shared Library
  • /var - Variable Data

Second Order Hierachy

Files in the /usr are often files included by the Operating Systems but not Essential for the system to boot.

  • /usr/bin -
  • /usr/sbin -
  • /usr/lib -
  • /usr/include -
  • /usr/share - Contains System independent files, things like images, examples, and text manuals

Files in the /opt is typically software from Third-Parties they are self-contained in there own sub-folder. Like /opt/vendorname/bin /opt/vendorname/lib /opt/vendorname/etc

  • /opt - Simply called "opt" it is designed for Optional Self-Contained Third-Party software

Third Order Hierachy

  • /usr/local/bin -
  • /usr/local/sbin -
  • /usr/local/etc -
  • /usr/local/lib -
  • /usr/local/share -