configuration

/etc/fstab — Persistent filesystem declarations

The administrator-maintained fstab describes filesystems and swap for mount-related tools and boot integration. Fields use whitespace; encode embedded spaces as \040 and tabs as \011, including inside quoted values. UUID or LABEL can avoid unstable device names. defaults selects filesystem/tool defaults, noauto excludes ordinary mount -a processing; the dump field is conventionally 0 if unused, and pass 0 skips boot fsck ordering. A valid record does not prove the device or mount is usable. On systemd hosts daemon-reload may be needed after authorized changes; it does not mount the filesystem. Test and retain the old file in a disposable VM before applying changes.

Formal Syntax & Structure

linux syntaxlinux
SOURCE TARGET FSTYPE OPTIONS DUMP PASS

Parameters & Attributes

NameTypeDescription
SOURCEfieldDevice, UUID, LABEL, remote or virtual source
TARGETfieldMount point
FSTYPEfieldFilesystem type
OPTIONSfieldComma-separated mount options
DUMPfieldDump selection number
PASSfieldfsck ordering number

Return Value

configuration or inspection

Parsed mount declarations, not actual mount state. findmnt --fstab inspects the table without mounting.

Working Example

Example Snippetlinux
d=$(mktemp -d) || exit 1trap 'rm -rf -- "$d"' EXITprintf "tmpfs /mnt/example tmpfs noauto,size=16m 0 0\n" > "$d/fstab"findmnt --raw --fstab --tab-file "$d/fstab" -n -o SOURCE,TARGET,FSTYPE
Linux Reference