LINUX FILE SYSTEM

Aditya Gaur
2 min readNov 10, 2021

File System in Linux is generally a layer which lies below operating system and the positioning of our data on storage is handled by it, without it the system won’t know from where which file starts or where it ends.

A Tree like Hierarchical structure is followed by Linux File System starting at the root. It consists of data files, directories and sub-directories. A standard layout recommended by Filesystem Hierarchy Standard is followed by this structure, which is a standard that Linux Foundation maintains.

Everything is a File in Linux.

It is a pretty straight forward concept but it may sound confusing. All the devices, data files, processes, etc. are considered as files and it is interacted by user as such which help in simplifying things.

Suppose as user wants a storage device to be cloned, the file designating the device can simply be copied by him to the desired target. File can also be used as storage device (virtual disk) without doing anything special.

All files and folders are part of same hierarchy of Linux filesystem

1.Path

A path is the process that indicates where the file or folder in Linux Filesystem is located. Paths are of two types.

1.Absolute path- It is the file’s full path that is starting from the root directory. For ex- /home/user-2/folder-3/file.txt

2.Relative path- It is the path of a file or folder in the director in which user is in. In the /home/user-2 folder, the relative path will be : folder-3/file.txt

2.Mount

Mounting refers to the process in which a storage device is associated to a particular location in directory tree. For example, after the booting of the system, a particular storage device is mounted on root directory .

3.Permission

File permissions are probably the best thing about the Linux Filesystem. There are strict rules for every file and folder that mention which user on the system can access or modify it.

4.Links

A link is a file pointing another file. In Linux Filesystem there are two types of links.

Soft Links also known as Symbolic Links point to a file that is in another location. It can span across different drives

Hard Links: Hard links contains multiple copies of entry of the same file. and can also be used in the same drive.

COMMAND SHELL

The Command shell interprets the Linux command line . An interface between user and the kernel is provided by the command shell and it executes programs called commands

For example, if ls is entered by user, then the ls command is executed by shell. Also the other programs such as scripts, applications and user programs can be executed by shell

--

--