Ancient index-card file system

Linux file system follows a tree-like hierarchical structure starting at the root. It consists of directories, sub-directories, and data files. This structure follows a standard layout recommended by Filesystem Hierarchy Standard (FHS), which is a standard maintained by the Linux Foundation.

Below, I provide a picture of a tree-like structure of the root directory.

Tree-like view of folders sitting on the root

Before moving forward, I want to emphasize a point that is unique to Unix-like systems. These systems intend to keep things simple and treat every thing as a sequence of bytes. These sequence of bytes are known as files to the OS. So, in that sense, everything is a file. Even your hardware devices are files. Your printer is a file, your memory is a file, basically everything. This approach has allowed these systems to become extremely flexible. Since I believe the internal workings of Linux directories has some merits to learn, I have created a section at the end of this tutorial to explain it in detail. However, for now, I skip this topic because you might get sidetracked.

Unlike Windows which has multiple roots, the Linux only allows one root. Below, you can see a picture of standard folders on the root directory. The root directory is where all other directories and files on the system reside and is designated by a forward slash / .

Here, in this tutorial, I try to explain each directory and provide some useful information about each one of them. I try to explain them in the order of importance and relevance.

Standard directories sitting on the root directory

/home directory

home directory, a.k.a login directory, is where every user stores their personal files and documents. Linux is a multi-user environment so each user is assigned a specific directory that is accessible only to them and the system administrator.

The home directory contains your personal configuration files, the so-called leading dot files. These files are usually hidden, and you need ls with -a option to view them. If there is a conflict between personal and system-wide configuration files, the settings in the personal files have priority.

This directly can grow very large as you store your files, downloads, applications, videos, pictures and sounds.

Keep in mind that this directory is the only directory that you can write on without the privileged access of root user. For the other directories, although you can read most of them without root access, you can’t modify and write on them.