FSTAB(5)

โœจ FSTAB(5) โ€” the manual, but make it a group chat โœจ

okay bestie, gather round, because fstab(5) is literally the blueprint of every filesystem your lil system knows how to mount, and you're gonna understand it fr fr ๐Ÿ’–


๐ŸŒธ NAME ๐ŸŒธ

fstab โ€” static information about the filesystems

like. the whole vibe. the static tea. ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

/etc/fstab

one file. one path. iconic.


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so, the file fstab holds descriptive information about the filesystems the system can mount. that's it, that's the whole job. and here's the thing โ€” fstab is only read by programs, and never written. nobody writes to it. it's not a journal, it's not a scratchpad. it's a vibe document, and it is the duty of the system administrator to properly create and maintain this file. yes that's you, bestie. no cap.

also, the order of records in fstab matters, because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing. they go top to bottom, one by one, like a little conga line. so if you reorder stuff, things change. periodt.

and like, the file is not read by mount(8) only โ€” many other tools and daemons use it too, and proper functionality may require additional steps. for example, on systemd-based systems, it's recommended to use systemctl daemon-reload after modifying fstab. so do that. don't skip it. ๐Ÿ™ˆ

psst โ€” for the details about swap area fstab configuration, go read the swapon(8) man page. it's a whole separate saga.

Every filesystem gets its own line, with the fields separated by tabs or spaces. the line is split into fields before being parsed โ€” and that part matters a LOT, because it means any spaces or tabs inside a field must be escaped using \040 or \011, even within quoted strings (e.g. LABEL="foo\040bar"). yes, even inside the quotes. the quoting does not save you. it's giving "the parser doesn't care about your feelings." ๐Ÿ˜ญ

Lines starting with # are comments. Blank lines are ignored. slay, comments are valid.

here's a typical example of an fstab entry, and yes you should screenshot it:

LABEL=t-home2   /home      ext4    defaults,auto_da_alloc      0  2

๐Ÿ’œ The first field (fs_spec) ๐Ÿ’œ

This field describes the block special device, remote filesystem or filesystem image for loop device to be mounted, or the swap file or swap device to be enabled. busy field. main character energy.

For ordinary mounts, it holds (a link to) a block special device node โ€” as created by mknod(2) โ€” for the device to be mounted, like /dev/cdrom or /dev/sdb7. For NFS mounts, this field is <host>:<dir>, e.g., knuth.aeb.nl:/. For filesystems with no storage, any string can be used, and it'll show up in df(1) output, for example. typical usage is proc for procfs; mem, none, or tmpfs for tmpfs. Other special filesystems, like udev and sysfs, are typically not listed in fstab.

You can give LABEL=<label> or UUID=<uuid> instead of a device name, and honestly this is the recommended method, because device names are often just a coincidence of hardware detection order and can change when other disks are added or removed. like, imagine your mount point ghosting you because you plugged in a USB. no thank you. for example, 'LABEL=Boot' or 'UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. (and to set LABELs on filesystems, use a filesystem-specific tool like e2label(8), xfs_admin(8), or fatlabel(8)).

It's also possible to use PARTUUID= and PARTLABEL=. these partition identifiers are supported for example for GUID Partition Table (GPT). ๐Ÿ’…

For more details about device identifiers, see mount(8), blkid(8) or lsblk(8).

โš ๏ธ important lil note: mount(8) uses UUIDs as strings. the string representation of the UUID should be based on lower case characters. BUT when you're specifying the volume ID of FAT or NTFS file systems, upper case characters are used (e.g. UUID="A40D-85E7" or UUID="61DB7756DB7779B3"). so yes, casing is load-bearing here. do not freestyle it.

๐Ÿ’– The second field (fs_file) ๐Ÿ’–

This one describes the mount point (target) for the filesystem. for a swap area, this field should be specified as none. and if the name of the mount point contains spaces or tabs, those can be escaped as \040 and \011 respectively. same escape dance as before. ๐Ÿฉฐ


๐ŸŒˆ The third field (fs_vfstype) ๐ŸŒˆ

This field describes the type of the filesystem. Linux supports SO many filesystem types: ext4, xfs, btrfs, f2fs, vfat, ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. for more details, see mount(8).

An entry of swap denotes a file or partition to be used for swapping, cf. swapon(8). an entry of none is useful for bind or move mounts.

More than one type may be specified in a comma-separated list. multitasking queen.

mount(8) and umount(8) support filesystem subtypes. the subtype is defined by a .subtype suffix โ€” for example 'fuse.sshfs'. and it's recommended to use the subtype notation rather than adding any prefix to the first fstab field. for example, 'sshfs#example.com' is deprecated. put it down. let it go. ๐Ÿ’€


๐ŸŽ€ The fourth field (fs_mntops) ๐ŸŽ€

This field describes the mount options associated with the filesystem.

It's formatted as a comma-separated list of options and it's optional for mount(8) or swapon(8). the usual convention is to use at least the "defaults" keyword there. (use it. just use it. it's free.)

It usually contains the type of mount (ro or rw โ€” the default is rw), plus any additional options appropriate to the filesystem type (including performance-tuning options). for details, see mount(8) or swapon(8).

Basic filesystem-independent options, aka the ones you'll actually meet at parties:

  • defaults โ€” use default options. The default depends on the kernel and the filesystem. mount(8) does not have any hardcoded set of default options. The kernel default is usually rw, suid, dev, exec, auto, nouser, and async.
  • noauto โ€” do not mount when mount -a is given (e.g., at boot time)
  • user โ€” allow a user to mount
  • owner โ€” allow device owner to mount
  • comment โ€” or x-<name> for use by fstab-maintaining programs
  • nofail โ€” do not report errors for this device if it does not exist.

๐Ÿงš The fifth field (fs_freq) ๐Ÿงš

This field is used by dump(8) to determine which filesystems need to be dumped. It defaults to zero (don't dump) if not present.


โญ The sixth field (fs_passno) โญ

This field is used by fsck(8) to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a fs_passno of 1. Other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize the parallelism available in the hardware. It defaults to zero (don't check the filesystem) if not present.


๐ŸŒŸ FILES ๐ŸŒŸ

  • /etc/fstab
  • <fstab.h>

๐Ÿ’… NOTES ๐Ÿ’…

The proper way to read records from fstab is to use the routines getmntent(3) or libmount. do that. don't hand-roll a parser, bestie, it never ends well. ๐Ÿ˜ญ

The keyword ignore as a filesystem type (3rd field) is no longer supported by the pure libmount based mount utility (since util-linux v2.22). it's gone, it's retired, we don't talk about it.

Also, real talk: this document describes the handling of fstab by util-linux and libmount. For systemd, read the systemd documentation โ€” there are slight differences. so don't come for me if systemd does its own lil thing. ๐Ÿซถ


๐Ÿฆ‹ HISTORY ๐Ÿฆ‹

The ancestor of this fstab file format appeared in 4.0BSD. ancient. legendary. the blueprint. ๐Ÿ‘‘


๐ŸŒธ SEE ALSO ๐ŸŒธ

go read them, they're all bangers, iykyk ๐Ÿ’–


๐Ÿ› REPORTING BUGS ๐Ÿ›

For bug reports, use the issue tracker:

https://github.com/util-linux/util-linux/issues

โœจ AVAILABILITY โœจ

fstab is part of the util-linux package, which can be downloaded from the Linux Kernel Archive:

https://www.kernel.org/pub/linux/utils/util-linux/

okay that's the whole page, you ate it, you understood it, you're now the group chat's resident mount expert ๐Ÿ’…โœจ this little love letter was brought to you by util-linux 2.42.4, dated 2026-09-21, and it's part of the file formats section, so yes it really is that girl ๐ŸŽ€๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms