0

I found the file system hard to remember, since they are not categorized properly.

I tried to categorize them as the follows

enter image description here

Could you please offer any comment to revise it?

1 Answer 1

3

I wouldn't recommend trying to categorize the root directory hierarchy, since some directories could belong to multiple categories. /proc for instance isn't only relevant to boot and run categories as in the table in your question. A good example of that are /proc/cpuinfo and /proc/devices - these provide information about hardware rather than anything specific to (just) booting and running executables.

The Filesystem Hierarchy is a Standard maintained by Linux foundation, and since Ubuntu is based on Debian, there's also a page in Debian documentation that addresses these. If we are going to categorize things, let's consider the mentioned Debian page, with the highlighted parts. Roughly you could summarize them into:

  • Binaries(aka executable files, though they may contain other data): /bin/, /usr/bin, /opt

  • Devices and filesystems: /dev, /proc, /sys, /media/, /mnt. Yes, /proc, /dev/ and /sys are virtual filesystems exposed by kernel.

  • Data and configurations: /etc/, /var, /tmp, /usr. Note that /usr is here because as stated in Debian page this is "[s]econdary hierarchy for shareable, read-only data" and "files that are not-required to boot or rescue the system"

  • User directories: /home

  • Libraries for binaries: /lib

Keep in mind, this category isn't official, but these are the categories that would use Linux/Unix terminology. Note also that this is also not exhaustive set of categories, but they're broad enough to address possible uses for each directory, as in /proc example.

Not the answer you're looking for? Browse other questions tagged .