Monday, June 29, 2020

Linux File System

A file system is a process that manages how and where data on a storage disk is stored, accessed and managed.

In a UNIX/Linux type OS, "Everything is a file", which means that everything in the computer system from processes, files, directories, sockets, pipes, ... is represented by a file descriptor abstracted over the virtual file-system layer in the kernel. The virtual file system is an interface provided by the kernel. Hence the more accurate phrase is "Everything is a file descriptor", or to make it even more accurate, Linus Torvalds himself corrected it again as :"Everything is a stream of bytes".

Linux main directories list:

/(root file system)
The root file system is the top level directory of the file system. It must contain all of the files required to boot the Linux system before other file systems are mounted. It must include all of the required executables and libraries required to boot the remaining file systems. After the system is booted, all other file system are mounted on standard, well-defined mount points as sub-directories of the root file system.

/bin
Contains User executable files.

/boot
Contains the static boot loader and kernel executable and configuration files required to boot a Linux computer.

/dev
This abstract directory contains the device files for every hardware device attached to the system. These are not device drivers, rather they are files that represent each device on the computer and facilitate access to those devices.

/proc
Another abstracted directory which is created when the system boots. Contains information about the processed on your system.

/etc
Contains the local system configuration files for the host computer.

/home
Home directory storage for user files. Each user has a sub-directory in /home.

/lib
Contains shared library files that are required to boot the system.

/media
A place to mount external removable media devices such as USB thumb drives that may be connected to the host.

/mnt
A temporary mount point for regular file systems (as in not removable media) that can be used while the administrator is repairing or working on a file system.

/opt
Optional files such as vendor supplied application programs should be located here.

/root
This is not the root (/) file system. It is the home directory for the root user.

/sbin
System binary files. These are executables used for system administration.

/tmp
Temporary directory. Used by the operating system and many programs to store temporary files., Users may also store files here temporarily. Not that files stored here may be deleted at any time without prior notice.

/usr
These are shareable, read-only files, including executable binaries and libraries, man files, and other types of documentation.

/var
Variable data files are stored here. This can include things like log files, MySQL, and other database files, web server data files, email inboxes, and much more.


No comments:

Post a Comment