If you're a regular windows user you may have seen some folder like C:, D:. But in linux the hierarchy is different and it's more likely to an UNIX system. As in windows C: / D: / E: these are the root folder but in linux the root folder are bin, root, use, hoome, temp, var etc.
The Linux file system contains the following sections:
- The root directory (/)
- A specific data storage format (EXT3, EXT4, BTRFS, XFS and so on)
- A partition or logical volume having a particular file system.
Learn more about Linux File System Strucure
The Filesystem Hierarchy Standard defines the directory structure and directory contents in Linux distributions. It is maintained by the Linux Foundation. The latest version is 3.0, released on 3 June 2015.
-
here some important directories are discussed:
- /bin: (Binaries) contains executables that are essential t the entire operating system.
- /sbin: (System Binaries) Contains Executables that are essential and should be executable by root user
- /lib: (Library) Many binaries from /Bin & /Sbin are shared to this diractory to store.
- /usr: (User Directory) Binaries which are not OS and intended for end user are contain here.
- bin: all those kind of binaries contains here
- local
- bin: contains those binaries which are compiles by user manually. All these binaries are seperated to aboid conflict with softwares installed by system package manager
- /etc : (Etcetra) contains editable text configuration. Many files with
.conf
which are text based flie are present here user can modify them as per requirement. - /home: User's personal space. In a multiuser OS here contains multiple user's directory registered on system.
- /boot: contains files which are needed to boot the system. e.g.: system's bootloader, kernel are present here.
- /dev: (device File) contains all those devices (both block type and character type devices) connected to that computer. Here we interact/mount any device.
- /opt: (Optional) contains optional or add-on softwares with which we rarely interact.
- /var: (Variables) Contains variable files that will change as the use of OS. Example- logs, caches.
- temp: The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp
- /temp: (Temporary Files) The /tmp directory must be made available for programs that require temporary files.
- /proc: (Process) This is an illusionary file system that doesn't actually existson the disk but is created in the memory by kernel to keep track of all runnung processes.