.Dd September 27, 2026 .Dt GENFSTAB 8 .Os .Sh NAME .Nm genfstab .Nd write an fstab for what is mounted .Sh SYNOPSIS .Nm .Op Fl d .Ar mountpoint .Sh DESCRIPTION .Nm prints an .Xr fstab 5 for the file systems mounted at and below .Ar mountpoint , with paths relative to it. Pseudo file systems and loop devices are left out. Every swap partition the running system can see is added, and so are fixed lines for .Pa /dev/pts , .Pa /dev/shm and the EFI variables. .Pp File systems are named by UUID, so the table keeps working when disks are renamed. .Pa /boot/efi is mounted .Cm nodev , noexec and .Pa /tmp .Cm nosuid , nodev ; everything is .Cm noatime . .Bl -tag -width Ds .It Fl d Name file systems by device path, such as .Pa /dev/nvme0n1p2 , instead of UUID. .El .Sh EXAMPLES In the installer: .Dl # genfstab /mnt > /mnt/etc/fstab .Pp On a running system, to copy lines from: .Dl # genfstab / > /etc/fstab.new .Sh SEE ALSO .Xr fstab 5 , .Xr installation 7 .Sh CAVEATS Run from a system that has swap of its own, the swap lines include it.