[go: up one dir, main page]

0% found this document useful (0 votes)
33 views8 pages

Linux File System

Uploaded by

ronichotu2310
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views8 pages

Linux File System

Uploaded by

ronichotu2310
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Linux File System :

• A Linux file system is a structured collection of files on a disk drive


or a partition.
• A partition is a segment of memory and contains some specific
data.
• The general-purpose computer system needs to store data
systematically so that we can easily access the files in less time.
• It stores the data on hard disks (HDD) or some equivalent storage
type.
• Data storage is preferred on hard drives as compared to standard
RAM as RAM costs more than disk space , it may lose the data if it
get turned off.

Linux File System

• Linux file system is generally a built-in layer of a Linux operating


system used to handle the data management of the storage.
• It helps to arrange the file on the disk storage.
• It manages the file name, file size, creation date, and much more
information about a file.

Linux file system structure

• Linux file system has a hierarchal file structure as it contains a root


directory and its subdirectories.
• All other directories can be accessed from the root directory. A
partition usually has only one file system, but it may have more
than one file system.
• The data structure needs to support a hierarchical directory
structure; this structure is used to describe the available and used
disk space for a particular block.
• It also has the other details about the files such as file size, date &
time of creation, update, and last modified.
• Linux file system contains two-part file system software
implementation architecture.
• The file system requires an API (Application programming
interface) to access the function calls to interact with file system
components like files and directories.
• API facilitates tasks such as creating, deleting, and copying the
files.
• The first two parts of the given file system together called a Linux
virtual file system.
• A file system mainly consists of 3 layers
• The 3 layers are as follows :

1. Logical File System :

• The Logical File System acts as the interface between the user
applications and the file system itself.
• It facilitates essential operations such as opening, reading, and
closing files.
• Essentially, it serves as the user-friendly front-end.

2. Virtual File System :


• The Virtual File System (VFS) is a crucial layer that enables the
concurrent operation of multiple instances of physical file systems.
• It provides a standardized interface, allowing different file systems
to operate simultaneously.
• This layer abstracts the underlying complexities, ensuring
compatibility between various file system implementations.

3.Physical File System :

• The Physical File System is responsible for the tangible


management and storage of physical memory blocks on the disk.
• It handles the low-level details of storing and retrieving data,
interacting directly with the hardware components.
• This layer ensures the efficient allocation and utilization of physical
storage resources.

Type of Linux file System

1) ext (Extended File System):

It is the first file system specifically designed for Linux. It is the first
member of the ext family of file systems.
2) ext2:

It is a non-journaling file system that is preferred to be used with flash


drives and SSDs.
It allows managing two terabytes of data.

3) ext3:

It prevents long delays at system boot if the file system is in an


inconsistent state after an unclean shutdown.
Ext3 is developed through Ext2.
It is an upgraded version of Ext2 and contains backward compatibility.

4) ext4:

It has backward compatibility with ext3 and ext2 .


It provides several other features, some of which are persistent pre-
allocation, unlimited number of subdirectories.
ext4 is the default file system for many Linux distributions.

5) JFS (Journaled File System):

JFS stands for Journaled File System, and it is developed by IBM for
AIX Unix.
It is an alternative to the Ext file system.
It can also be used in place of Ext4, where stability is needed with few
resources.
JFS performs well under different kinds of load but is not commonly used
anymore due to the release of ext4 in 2006 which gives better
performance.
6) ReiserFS:

ReiserFS is an alternative to the Ext3 file system.


It has improved performance and advanced features.
In the earlier time, the ReiserFS was used as the default file system in
SUSE Linux.

7) XFS:

XFS file system was considered as high-speed JFS.


It provides features like snapshots, online defragmentation, sparse files,
variable block sizes, and excellent capacity.

8) Swap File System:

The swap file system is used for memory paging in Linux operating
system during the system hibernation.
A system that never goes in hibernate state is required to have swap
space equal to its RAM size.
Directory Structure

• The directories help us to store the files and locate them when we
need them.
• Also, directories are called folders
• Directories can be organized in a tree-like hierarchy in Linux and
several other operating systems.
• The directory structure of Linux is well-documented and defined in
the Linux FHS (File system Hierarchy Standard).

Linux directory list and their purposes:

o / (root file system):

It is the top-level filesystem directory.

It must include every file needed to boot the Linux system before
another filesystem is mounted.

Every other filesystem is mounted on a well-defined and standard


mount point because of the root filesystem directories after the system
is started.

o /boot:

It includes the static kernel and bootloader configuration and


executable files needed to start a Linux computer.

o /bin:

This directory includes user executable files.

o /dev:

It includes the device file for all hardware devices connected to the
system.

These aren't device drivers; instead, they are files that indicate all
devices on the system and provide access to these devices.

o /etc:
It includes the local system configuration files for the host system.

o /lib:

It includes shared library files that are needed to start the system.

o /home:

The home directory storage is available for user files. All users have
a subdirectory inside /home.

o /mnt:

It is a temporary mount point for basic filesystems that can be used


at the time when the administrator is working or repairing a
filesystem.

o /media:

A place for mounting external removable media devices like USB


thumb drives that might be linked to the host.

o /opt:

It contains optional files like vendor supplied application programs


that must be placed here.

o /root:

It's the home directory for a root user. Keep in mind that it's not the
'/' (root) file system.

o /tmp:

It is a temporary directory used by the OS and several programs for


storing temporary files. Also, users may temporarily store files here.
Remember that files may be removed without prior notice at any
time in this directory.

o /sbin:
These are system binary files. They are executables utilized for
system administration.

o /usr:

They are read-only and shareable files, including executable


libraries and binaries, man files, and several documentation types.

o /var:

Here, variable data files are saved. It can contain things such as
MySQL, log files, other database files, email inboxes, web server
data files, and much more.

You might also like