Explained Linux File System Hierarchy
Covered mostly used Linux file system directories in short and easy language.

As a devops engineer, you must know commonly used Linux file system directories. What are their works, purpose and what they stores.
In this blog, I will explain most commonly used Linux file system directories one-by-one with simple explanation.
1. /dev
In Linux operating system, there are three types of files.
- Content file such as .txt, .pdf, etc.
- Directory file such as folder.
- Device files (Hardware Representation).
/dev directory contains device files which interacts with hardware of the machine and supports block and character data transmission. In simple words, these files enables operating system to talk with hardware devices.
Block Data Transmission
Means data transfers in blocks and each block have many characters of data. This block data transmission happens with devices like USB Drive, storage device, etc.
Character Data Transmission
As it name suggests, data transmission happens in characters only. This character data transmission works with devices such as keyboard, speaker, etc.
2. /bin
This /bin contains binary files of Linux commands that any user can execute without root permissions. For example: You runs a ls command in your linux system but that commands executes from this /bin/ls path.
So commands which are present in this folder/directory, any user on linux operating system can execute those commands without root or admin permission.
3. /etc
It contains configurations and settings of users, groups, network, and the system. It tells OS that how things should work. In simple words we cay it is a base of rules and settings which tells operating system how things will work in the computer.
4. /home
This directory contains all the users data with their username. /home it is a home directory and all users directories with their username creates here and each user have access their personal directory only. Other user can not do any operation in another user directory without root permission.
For Example If in a linux computer system have two users as:
- user1
- user2
then in /home directory will have two directories as user1 and user2.
5. /root
This directory is the home directory of the root (administrator) user. Only the root user can access it. Normal users cannot access /root without sudo or root permission.
6. /var
- This folder stores changing data like logs, cache, and database files.
- It keeps growing when system is running. Many apps save their data here.
7. /tmp
- This folder stores temporary files.
- Files here are used for short time only.
- Most of the files get deleted when system reboot.
8. /boot
- This folder contains boot files.
- It has Linux kernel and boot loader files.
- These files help the system to start.
9. /lib and /lib64
- These folders store important system libraries.
- Programs need these files to run.
- /lib64 is used in 64 bit systems.
10. /media
- This folder is used to mount external devices.
- Like pendrive, USB, CD or memory card.
- When you plug a USB it shows here.