You are on page 1of 3

Explain Linux directory structure and write the names of Linux top level directories.

The Linux directory structure is like a tree. The base of the Linux file system hierarchy begins at the root.
Directories branch off the root, but everything starts at root.

The directory separator in Linux is the forward slash (/). When talking about directories and speaking
directory paths, “forward slash” is abbreviated to “slash.” Often the root of the file system is referred to
as “slash” since the full path to it is /. If you hear someone say “look in slash” or “that file is in slash,”
they are referring to the root directory.

Top Level Directories.

Directories Explanation
/ The directory called “root.” It is the starting point for the file system hierarchy. Note
that this is not related to the root, or super user, account.
/bin Binaries and other executable programs.
/etc System configuration files.
/home Home Directories.
/opt Optional or third party software.
/tmp Temporary space, typically cleared on reboot.
/usr User related programs.
/var Variable data, most notably log files.
Please explain any four Linux directories.

1 /run – Application State Files

The /run directory is fairly new, and gives applications a standard place to store transient files they
require like sockets and process IDs. These files can’t be stored in /tmp because files in /tmp may be
deleted.

2 /sbin ( System Administration Binaries )

Just like /bin, /sbin also contains binary executables.

But, the linux commands located under this directory are used typically by system aministrator, for
system maintenance purpose.

For example: iptables, reboot, fdisk, ifconfig, swapon.

3 /proc – Kernel & Process Files

The /proc directory similar to the /dev directory because it doesn’t contain standard files. It contains
special files that represent system and process information.

This is a pseudo filesystem contains information about running process.

For example: /proc/{pid} directory contains information about the process with that particular pid.

This is a virtual filesystem with text information about system resources.

For example: /proc/uptime

4 /lost+found – Recovered Files

Each Linux file system has a lost+found directory. If the file system crashes, a file system check will be
performed at next boot. Any corrupted files found will be placed in the lost+found directory, so you can
attempt to recover as much data as possible.

You might also like