Hello friends today i will be talking about the Linux File System in this post I will be talking about what is a Linux file system and how it works so a big thanks goes to Ahmed Alkabary how explained the full file system in depth for all the beginners to understand so here is the video of it so you can see it and understand it better :-
How Does It Work?
Friends so the Linux File System works on a tree-like structure and it just works like a tree as starts from the Root dir to the child dirs.
Understanding Linux File System
Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the base of the file system and all other directories spreading from there.
A Unix filesystem is a collection of files and directories that has the following properties −
- It has a root directory (/) that contains other files and directories.
- Each file or directory is uniquely identified by its name, the directory in which it resides, and a unique identifier, typically called an inode.
- By convention, the root directory has an inode number of 2 and the lost+found directory has an inode number of 3. Inode numbers 0and 1 are not used. File inode numbers can be seen by specifying the -i option to ls command.
- It is self-contained. There are no dependencies between one filesystem and another.
The directories have specific purposes and generally hold the same types of information for easily locating files. Following are the directories that exist on the major versions of Unix −
|Sr.No.||Directory & Description|
This is the root directory which should contain only the directories needed at the top level of the file structure
This is where the executable files are located. These files are available to all users
These are device drivers
Supervisor directory commands, configuration files, disk configuration files, valid user lists, groups, ethernet, hosts, where to send critical messages
Contains shared library files and sometimes other kernel-related files
Contains files for booting the system
Contains the home directory for users and other accounts
Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy diskette drive, respectively
Contains all processes marked as a file by process number or other information that is dynamic to the system
Holds temporary files used between system boots
Used for miscellaneous purposes, and can be used by many users. Includes administrative commands, shared files, library files, and others
Typically contains variable-length files such as log and print files and any other type of file that may contain a variable amount of data
Contains binary (executable) files, usually for system administration. For example, fdisk and ifconfig utlities
Contains kernel files