linux file system

Linux Basics: Understanding the Linux File System Structure


 The Linux file system is a hierarchical structure that serves as a roadmap to the Linux operating system. It contains directories such as /etc, /var, /home, /usr, and more, each having specific uses and purposes. This article provides an overview of these directories to help you navigate the Linux file system with ease.


A fundamental part of working with Linux is understanding its file system structure. Unlike Windows, which uses different drive letters for different partitions and devices, Linux puts everything under a single directory, known as the root directory (/), and other directories branch off from there.

Linux File System Hierarchy

Here’s a brief overview of the main directories:


Linux file system structure

The root directory, it is the parent of all other directories in the system. If you need to find files due to storage issues you should go to this directory first then run commands about how to view storage usage.


This directory contains essential binary executables that all users need access to, such as the ls, cp, mv, rm, and cd commands.


The /etc directory is where system-wide configuration files and directories are located.


/home is the personal directory for users. Each user has a separate directory under /home.


/var stands for variable. This directory contains files to which the system writes data during the course of its operation.


/usr is one of the largest directories in the Linux file system, it contains user binaries, their documentation, libraries, header files, and so on.


Like /bin, /sbin also contains binary executables. But, the binaries inside, such as fdisk, fsck, ifconfig, etc., are normally used for system maintenance purposes.


This directory contains library files that supports the binaries located under /bin and /sbin.


The /opt directory provides storage for application software packages.


As the name suggests, /tmp is used as temporary storage by the system and users.


The /boot directory includes files needed to start the boot process.


The Linux file system structure may seem complex at first, but once you understand the basics of how it’s organized, it becomes easier to navigate. Remember, Linux treats everything as a file – even hardware devices like printers and USB drives.

For more specific information about a directory, you can refer to the Filesystem Hierarchy Standard (FHS), which describes the directory structure and its contents in Linux distributions.