Differences between revisions 2 and 3
Revision 2 as of 2023-06-22 20:40:30
Size: 1967
Comment:
Revision 3 as of 2023-06-22 20:41:42
Size: 1943
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Linux/fstab
= fstab =
= FsTab =
Line 4: Line 3:
The '''fstab''' file is a list of hardware devices, file system drive mounts, and mount options. It can be found at `/etc/fstab` on a Linux system. The '''`fstab(5)`''' file, typically found at `/etc/fstab`, lists hardware devices, file system drive mounts, and mount options.
Line 6: Line 5:
Additionally, running `mount -a` will loop through this file. Running `mount -a` will loop through this file.
Line 14: Line 13:

This fstab file is structured as:
Line 57: Line 54:
----



== See also ==

[[https://man.archlinux.org/man/fstab.5|fstab(5)]]

FsTab

The fstab(5) file, typically found at /etc/fstab, lists hardware devices, file system drive mounts, and mount options.

Running mount -a will loop through this file.


Configuration

# <volume>    <dir>     <type> <options>   <dump> <fsck>
/dev/sda1     none      swap   defaults    0      2
/dev/sda2     /         ext4   rw,relatime 0      1
UUID=abcdefg  /mnt/hdd  ext4   rw,noatime  0      0

Spacing between columns is arbitrary. You can mix device filenames and volume UUIDs, though the latter are considered more durable. You can get the UUID of a volume with blkid. You can get the file system type of a device also with blkid.

Options

The <options> column can contain any of:

  • defaults (rw, suid, dev, exec, auto, nouser, async)

  • ro or rw - read-only/read-write permission

  • exec or noexec - allow/disallow execute permission

  • relatime, strictatime, or noatime - syncing access times relative to modify time, absolutely, or not at all

  • nodev - disallow special device files (recommended for hardening)

  • nosuid - disallow operation of SUID bit (recommended for hardening)

  • noauto - do not mount automatcally (i.e. with mount -a)

  • nofail - do not indicate errors if unavailable

  • user or nouser - allow/disallow user mounting

dump

The <dump> column is used by the dump utility. If you don't need that utility (and most people don't), set it to 0.

fsck

The <fsck> column is used by the fsck utility, and enables boot-time file system checks.

  • 0 disables checks.

  • 1 runs corrections based on checks. This is important for the root device.

  • 2 forces reboot on error.


See also

fstab(5)


CategoryRicottone

Linux/FsTab (last edited 2023-06-22 20:41:42 by DominicRicottone)