Linux Directory Structure
Linux and Windows have the following differences in their directory structures.
Root Directory
- Linux: All files and directories are arranged hierarchically under a single root directory
/
. Examples:/home
,/etc
,/usr
.
- Windows: Each drive (e.g.,
C:\
,D:\
) has its own separate root directory.
Path Separator
- Linux:
/
(forward slash) Example:/home/user/documents/file.txt
- Windows:
\
(backslash) Example:C:\Users\user\Documents\file.txt
Drive Naming Convention
- Linux: Drives are “mounted” as directories and appear under directories like
/mnt
or/media
.
- Windows: Drives are identified by letters (e.g.,
C:\
,D:\
).
Linux Directory Structure
The Linux directory structure and description of each directory are as follows:

/
: The top-level directory of the Linux file system hierarchy. It typically does not store data.
/bin
: Short for “binary”, this directory contains Linux software and commands.
/boot
: Contains files needed for booting and stores data related to kernel loading. It also includes GRUB bootloader files.
/dev
: Short for “device”. This directory stores files related to hardware devices, including files for hard disks, CD-ROMs, audio, and input devices.
/etc
: Short for “Etcetera”. Contains configuration files related to system and user packages.
/home
: Directory for users, similar to the “C:\Users\username” folder in Windows. When a user is created in Linux, a folder accessible only to that user is created under the /home directory.
/root
: The home directory of the root user (super administrative user). While regular users’ home directories are created under /home/username, the root user’s home directory is located at /root.
/run
: A memory-based temporary file system (TMPFS) that stores runtime data (PID, sockets, lock files, etc.) created after system boot.
/sbin
: Short for “System Binary”. Similar to the /bin directory, but stores executable files needed for system maintenance or administrative tasks. Typically includes executable files related to booting, backup, and recovery.
/tmp
: Directory where temporary files are stored. For example, when downloading and installing packages, you can download to the /tmp directory and then install. This directory is accessible to all users.
/usr
: Short for “Unix System Resources”. One of the most useful directories in the Linux operating system, containing read-only data such as shareable binaries, documentation, and libraries. Used as a user system resources directory.
/var
: Short for “Variable”. One of the important directories in Linux with characteristics opposite to the /usr directory. Stores dynamically changing data (e.g., log files).