Which file system is supported by linux

What is Linux File System? Easy Guide

You may already know a little bit about Linux, but you may not know exactly how your data is being handled under the hood. Because if you’re like a lot of other Linux users, you just take for granted these sorts of things.

But your Linux file system isn’t so carefree, so, today that’s exactly what we will be talking about – the Linux File System.

Table of Contents

What is Linux File System?

Linux file system is the collection of data and/or files stored in a computer’s hard disk or storage, your computer relies on this file system to ascertain the location and positioning of files in your storage, were it not there, the files would act as if they are invisible, obviously causing many problems.

There are actually many different file systems that exist for Linux, if you’re wondering which one you should use, we will provide a comprehensive list of the file systems that are supported by Linux.

What are the Linux File System Types?

Upon installation, Linux offers various file systems like the ones below that you can select from:

  • Ext
  • Ext2
  • Ext3
  • Ext4
  • JFS
  • XFS
  • btrfs
  • swap

We’ll delve into each one of these Linux File Systems and give a brief description.

Ext: “ext” is an acronym that stands for “extended file system” and was created in 1992 and is the very first file system designed specifically for Linux.

Its functionality was designed partly based on the UNIX file system. The purpose of its creation originally was to innovate beyond the file system used before it (the MINIX file system) and overcome its limitations.
As this file system is about 30 years old at the time this article was written, many Linux distros no longer support it, so it is not really used anymore.

Ext2: also referred to as “second extended system”. Created in 1993, ext2 was designed to be the successor of the original extension system for Linux.

It innovated in areas such as storage capacity, and general performance. This file system notably allows for up to 2 TB of data. Like ext, this file system is very old, so it really should just be avoided.

Ext3: ext3, or third extended system, created in 2001, surpasses ext2 in that it is a journaling file system. A journaling file system is a system that records in a separate log changes and updates to files and data before such actions have been completed.

This means that if for some reason, the computer or hard disk(s) crash or experience some kind of power failure, this separate log containing the changes made before the crash can be used to access that stored data, thus repairing and restoring the files upon reboot.

Nowadays, there are so many better options to choose from that there’s hardly any reason to use this extended file system anymore either.

Ext4: ext4, standing for “fourth extended system”, was created in 2006. Because this file system overcomes numerous limitations that the third extended system had, it is both widely used, and the default file system that most Linux distros use.

While it may not be the most cutting edge, it is absolutely reliable and stable – which is really valuable in Linux.

Thus, if you aren’t particularly keen on racking your brain between the different pros and cons of all the many file systems you can choose from, we definitely recommend you just go with this one.

JFS: The file system JFS was created by IBM in 1990 and the name JFS is an acronym standing for Journaling File System, as we’ve already covered this concept with the number 3 file system in this article, you should already be quite familiar with what exactly this means.

Читайте также:  Manjaro linux gnome обзор

It’s easy to recover data after a power failure and quite reliable. What’s more is it uses less CPU power than the other file systems.

XFS: xfs, an acronym that stands for “Extent File System”, was created by Silicon Graphics and originally made for their OS “IRIX”, but was later given to Linux.

Created in 1990, XFS is a 64-bit high performance journaling file system. It’s particularly noteworthy for how incredibly well it works with very large files. Though contrarily, not especially the
best with smaller files.

Btrfs: btrfs, which is yet another acronym standing for B Tree File System, created by Oracle in 2009. It is regarded as a rival file system to ext4, though it’s consensus that overall ext4 is the better file system, as it transfers data faster and offers more stability but although this is the case, that does not mean btrfs isn’t worth looking into.

There are a couple things that are unique and advantageous about btrfs. And in general it has excellent performance.

If you couldn’t tell already from the comparisons made in our list, ext4 is and is regarded as the best Linux File System.

What file system does my system use?

If you’re wondering which file system your distro has by default or simply just which one you have currently, you can define that for yourself using some pretty nifty commands in your terminal.

There are multiple ways that you can do this, but we’ll show you the easiest one down below:

Short for “disk free”, df is a command used to display the free disk space in Linux and other similar operating systems. It is also used to understand and ascertain the file systems that are mounted.

Now, you may have noticed that I mentioned that this command can be used to define the file system mounted, but when you run the “df” command yourself, there is no mention of any types of file systems. (shown below)


Well, that is where this interesting little option comes in: open your terminal and execute this command:

This is a variation of the df command. It will display the file system type along with other currently irrelevant information. (shown below)

As you can see, in the second column under “Type” the file system type is defined. You should now be able to ascertain which file system you currently have mounted on your Linux distro.

What is Top Level in Linux?

/ is the top level directory of a Linux system. The name “top level” means the “root”, thus it is the root directory of the system. Though it is separate from “/root directory”, so you shouldn’t confuse the two.

All other directories stem from this top level directory like a pyramid. This concept is not unique to Linux, as the same thing can be observed in other Operating Systems such as a very interesting one you may have heard of called Windows. Windows has partitions such as C: and D:.

In Linux, these directories in the so-called “pyramid” exist in a hierarchy with a specific structure. This can be observed in your terminal by using the command:

, and then displaying the directories and files while in the top level directory. (shown below)

Most distros have the same structure, and the differences between some of them being only minuscule. Now that you know what the top level directory is, let’s take a comprehensive dive into what the rest of these directories are and what you can do with them.

What Are the Linux File System Directories?

/bin – essential utilities

The directory contains the core system programs and important utilities. For example, commonly used and well known commands such as “cat” are located in “/bin”.

The reason for this is that if these utilities are not stored in this directory, there is no certainty that the system will have access to them if there isn’t a file system mounted.

There is the directory /sbin that is very similar to /bin, as it contains core system administration binaries (programs).

/boot – Boot for a Boot

Contains files that are required in order for the system to be booted. For example, BIOS, which stands for Basic Input/Output System.

The BIOS is responsible for executing the Master Boot Record (MBR) boot loader.

It checks the integrity of the hard disk(s) of the system before launching the MBR. /boot also contains Linux kernels and many other files in addition to BIOS.

Though, these files’ configuration files are not stored in /boot, rather they are stored in /etc, along with the many other various config files.

/dev – Devices or Files

Linux displays connected devices as files and the /dev directory contains these files. Though, the thing is, as you can see by the title, these are not “actual” files, they just appear as files. /dev is also where physical drives can be mounted.

Читайте также:  Windows net user name

/etc – Configuration files

As we discussed before, the configuration files of BIOS and other similar files can be found in /etc. You can edit these configuration files in a text editor as you see fit.

Basically, every single kind of configuration file is located in /etc, including but not limited to system configuration files.

/home – Home Folder Containment

There’s a home folder for every user on your system and each one is contained together in the /home directory. These folders are created using the name of your user name.

For example, your user name is joe, so your home folder would be located in /home/joe.

These home folders contain your user data files and configuration files that are specific to the user, which is also the one of the only types of configuration files that are stored elsewhere besides /etc as we explained above.

If one wants to modify other files on a system, they must become the root user, as each user only has write permissions for their own home folder.

/lib – Libraries for Programs

Each program or binary uses specific libraries to function and the /lib directory is where these libraries can be located.

/media – Mounted Media

Contains subdirectories where your physical media devices are mounted. For example, a CD, if inserted into your system, you can access its contents through its directory that is created in the /media directory upon insertion.

/mnt – Temporary Mounts

This directory is used for mounting temporary file systems. If you are using a file system for a very specific purpose and for a relatively brief period of time, you would probably mount it in /mnt. Though you can mount it anywhere on the system if you so chose.

/opt – Optional Packages

The /opt directory contains a set of subdirectories where optional software packages are located and managed by the package manager.

/proc – Kernel and Process Pseudo Files

The /proc directory is another interesting case of a directory that contains these “fake” files, very similarly to the /dev directory that we discussed earlier in this list. These files are special files that are actually, and interestingly, system and process information.

/root – Root User Directory

As we’ve discussed before, every user has his own home directory. This is the home directory of the root user. The root user’s home directory is located at /root.

Which is noteworthy because it is, unlike the rest of the users’ home directories, not located in /home. Like we’ve said above, in an earlier section of this article, /root is different from the root directory “/”, and this fact should be committed to memory if possible.

/sbin – System Administration Programs

The /sbin directory is similar to the /bin directory in that it contains essential programs. But it differs with the addition that it is intended to be used by the root user.

/tmp – Temporary Files

The /tmp directory is used to store temporary files that are deleted when the system is restarted. Utilities such as tmpwatch can be used to delete these temporary files in the /tmp directory.

/usr – User Shared Read-Only Data

The /usr directory is used to contain applications and files that are used and shared by and between users.

/var – Variable Data

The /var directory is used like the /usr directory, only instead of being read-only, it is writable. This directory contains system logs and other various variable data.

And with that, we conclude this topic. You should now have a pretty solid idea about what a Linux File System is and how to use it. Hope you learned something and thanks for reading!

Источник

/proc/filesystems: Find out what filesystems supported by Linux kernel

S o, How do you find out or see which filesystems are supported by the Linux kernel? The answer is simple. Use /proc/filesystems file. It is the file used to detect filesystems supported by running kernel. You can quickly run grep command or cat command to display the list of all supported file system. nodev indicates that the file system is not associated with a physical device such as /dev/sdb1. If you see ext3 or vfat, it means you will be able to mount ext3 and vfat based file systems. This page explains filesystems supported by Linux using various commands.

How to see which filesystems are supported by the Linux

Following cat command will quickly tell you what filesystems supported by currently running Linux kernel:
$ cat /proc/filesystems
Sample outputs:

Читайте также:  Как отключить счетчики производительности windows

For example, if the iso9660 fllesystem not listed, you can not mount standard CD-ROM file system. To add support simply recompile Linux kernel with iso9660 filesystem support.

Finding out Linux kernel modules

Type the following ls command to list the Linux kernel modules related to filesystem:
ls /lib/modules/$(uname -r)/kernel/fs/*/*ko

Click to enlarge image

Get a list of currently loaded Linux kernel modules

Run any one of the following command:
cat /proc/modules
OR use the lsmod command along with grep command to filter out filesystems such as zfs:
lsmod
lsmod | grep zfs
Sample outputs:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

Please note that the lsmod is an awesome command which nicely formats the contents of the /proc/modules, showing what kernel modules are currently loaded.

Linux based systems comes with the modprobe command, to add and remove modules from the Linux Kernel. To load zfs module, run:
sudo modprobe zfs
sudo modprobe -v zfs
See “how to load Linux kernel driver/modules automatically boot time” for more information.

Conclusion

You learned how to use various Linux command line utilities to list supported filesystems. See Linux wiki for more information here.

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

What does “nodev” in the beginning of a line mean?

It’s not always true. For example you will not see nfs and nfs4 in /proc/filesystems after reboot. But still you can mount remote nfs directory if needed packages are installed in the system. After successful mounting nfs and nfs4 will appear in /proc/filesystem. Tested on Ubuntu 11.10

i can still mount vfat usb drive even vfat not found in /proc/filesystems.But after mounting, it appears in /proc/filesystems too! Tested on kernel 2.4.35.4

The “nodev” string in the first column means that filesystem does not require a block device to be mounted, it’s so called virtual filesystem.

How to troubleshoot apache log errors. can u please explain step by step process in linux ??/

Just adding my 2 cents here. The only way to be sure about what filesystems are supported by the kernel or not is to check its configuration file. In my case, it is
and look for the filesystem type.
I searched for ISO9660 (for example) and found the following:

# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

The “m” means it was compiled as a module but not automatically inserted into the kernel.
In order to load it into the kernel, we must run the following command:
modprobe -a isofs
(where isofs is the alias of the corresponding module)
And then iso9660 will show up in the /proc/filesystems file.

(on a side note, the aliases for modules can be found in /lib/modules, then look for the directory of your kernel, and read the file modules.alias)

Sorry, I forgot to include the path to my kernel’s configuration file. Here it is:
/boot/config-3.2.0-4-686-pae

I got a list of loadable filesystems this way:

ls /lib/modules/$(uname -r)/kernel/fs/*/*ko

Источник

Оцените статью