File Hierarchy System in Linux
Linux systems perform most of their operations on files. They have a specific file hierarchy structure
, which describes where files and directories should be and what they should contain. Note that most distributions follow this structure however there may be changes in the structure depending on differences in distributions.
Important directories in the file hiearchy system are,
- Root directory: All files and directories come under the root directory. It's located at
/root
, where the forward slash/
represents the system root directory. - Home directory: Home directory contains a home folder for each user which contains user-specific files and configurations. It is located at
/home/<username>
. - Bin directory: Contains binary executables for system program and utilities are stored in this directory. It is located at
/bin
. - Lib directory: This directory is located at
/lib
and contains necessary libraries required by the binaries in/bin
directory. - User directory: This directory contains user specific binaries and data, instead of the system specific files. It is located at
/usr
, and has folders for binaries and their libraries for applications that are installed by the user.