- In computing, a file system (or filesystem) is used to control how data is stored and retrieved. Without a file system, information placed in a storage medium would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into pieces and giving each piece a name, the information is easily isolated and identified.
- Taking its name from the way paper-based information systems are named, each group of data is called a "file". The structure and logic rules used to manage the groups of information and their names is called a "file system".
Individual drive partitions can be setup using one of the many different available filesystems. Each has its own advantages, disadvantages, and unique idiosyncrasies. A brief overview of supported filesystems follows; the links are to Wikipedia pages that provide much more information.
Create a file system
Identify the partition where the file system will be created, for example with lsblk:
$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT sdb └─sdb1 vfat Transcend 4A3C-A9E9
An existing file system, if present, will be shown in the
FSTYPE column. If mounted, it will appear in the
MOUNTPOINT column or in the output of . For example:
$ findmnt /dev/sdb1
Mounted file systems must be unmounted withbefore proceeding:
# umount /mountpoint
To create a new file system, use #Types of file systems for the exact type, as well as userspace utilities you may wish to install for a particular file system.. See
For example, to create a new file system of type ext4 (common for Linux data partitions), run:
# mkfs.ext4 /dev/sdb1
The new file system can now be mounted to a directory of choice.
Types of file systems
See w:Comparison_of_file_systems for a detailed feature comparison.for a general overview, and
|File system||Creation command||Userspace utilities||Archiso ||Kernel documentation ||Notes|
|HFS||Optional||hfs.txt||macOS file system|
|NTFS||Yes||N/A (FUSE-based)||Windows file system|
|ZFS||AUR||No||N/A (OpenZFS port)|
All the above filesystems with the exception of ext2, FAT16/32, use journaling. Journaling provides fault-resilience by logging changes before they are committed to the filesystem. In the event of a system crash or power failure, such file systems are faster to bring back online and less likely to become corrupted. The logging takes place in a dedicated area of the filesystem.
Not all journaling techniques are the same. Ext3 and ext4 offer data-mode journaling, which logs both data and meta-data, as well as possibility to journal only meta-data changes. Data-mode journaling comes with a speed penalty and is not enabled by default. In the same vein, Reiser4 offers so-called "transaction models", which include pure journaling (equivalent to ext4's data-mode journaling), pure Copy-on-Write approach (equivalent to btrfs' default) and a combined approach which heuristically alternates between the two former. It should be noted that reiser4 does not provide an equivalent to ext4's default journaling behavior (meta-data only).
The other filesystems provide ordered-mode journaling, which only logs meta-data. While all journaling will return a filesystem to a valid state after a crash, data-mode journaling offers the greatest protection against corruption and data loss. There is a compromise in system performance, however, because data-mode journaling does two write operations: first to the journal and then to the disk. The trade-off between system speed and data safety should be considered when choosing the filesystem type.
FUSE-based file systems
Filesystem in Userspace (FUSE) is a mechanism for Unix-like operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space, while the FUSE kernel module provides only a "bridge" to the actual kernel interfaces.
Some FUSE-based file systems:
- adbfs-git — Mount an Android device filesystem.
- fuseiso — Mount an ISO as a regular user.
- vdfuse — Mounting VirtualBox disk images (VDI/VMDK/VHD).
- xbfuse-git — Mount an Xbox (360) ISO.
- http://multimedia.cx/xbfuse/ || AUR
- xmlfs — Represent an XML file as a directory structure for easy access.
- EncFS — EncFS is a userspace stackable cryptographic file-system.
- gitfs — gitfs is a FUSE file system that fully integrates with git.
See Wikipedia:Filesystem in Userspace#Example uses for more.
Special-type file systems
- CramFS — Compressed ROM filesystem is a read only filesystem designed with simplicity and efficiency in mind. Its maximum file size is less 16MB and the maximum file system size is around 272MB.
- eCryptfs — Enterprise Cryptographic Filesystem is a package of disk encryption software for Linux. It is implemented as a POSIX-compliant filesystem-level encryption layer, aiming to offer functionality similar to that of GnuPG at the operating system level.
- SquashFS — SquashFS is a compressed read only filesystem. SquashFS compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression.