:dagger: Format /etc/fstab files automatically
79
stars
68
commits
Go
primary language
Mar 18, 2026
updated
Take a stab at formatting /etc/fstab files with fstabfmt!
(Yes, yes, I know that it stands for "file system table". 🙂)
/etc/fstab files.-s flag.fstabfmt /etc/fstab to see the formatted output. No changes are made to the file.fstabfmt -s 8 /etc/fstab to see the formatted output with 8 spaces between fields. No changes are made to the file.fstabfmt -i /etc/fstab to make changes to /etc/fstab.Before:
# Static information about the filesystems.
# See fstab(5) for details.
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p2 LABEL=root
UUID=2bb3c21b-dc8f-401e-991b-66afd7301cb7 / xfs rw,relatime,inode64,logbufs=8,logbsize=32k,noquota 0 1
# /dev/nvme0n1p1 LABEL=boot
UUID=1815-DD5D /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
After:
# Static information about the filesystems.
# See fstab(5) for details.
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p2 LABEL=root
UUID=2bb3c21b-dc8f-401e-991b-66afd7301cb7 / xfs rw,relatime,inode64,logbufs=8,logbsize=32k,noquota 0 1
# /dev/nvme0n1p1 LABEL=boot
UUID=1815-DD5D /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
Go
91.7%
Makefile
5.6%
Shell
2.7%
:dagger: Format /etc/fstab files automatically
79
stars
68
commits
Go
primary language
Mar 18, 2026
updated
Take a stab at formatting /etc/fstab files with fstabfmt!
(Yes, yes, I know that it stands for "file system table". 🙂)
/etc/fstab files.-s flag.fstabfmt /etc/fstab to see the formatted output. No changes are made to the file.fstabfmt -s 8 /etc/fstab to see the formatted output with 8 spaces between fields. No changes are made to the file.fstabfmt -i /etc/fstab to make changes to /etc/fstab.Before:
# Static information about the filesystems.
# See fstab(5) for details.
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p2 LABEL=root
UUID=2bb3c21b-dc8f-401e-991b-66afd7301cb7 / xfs rw,relatime,inode64,logbufs=8,logbsize=32k,noquota 0 1
# /dev/nvme0n1p1 LABEL=boot
UUID=1815-DD5D /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
After:
# Static information about the filesystems.
# See fstab(5) for details.
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p2 LABEL=root
UUID=2bb3c21b-dc8f-401e-991b-66afd7301cb7 / xfs rw,relatime,inode64,logbufs=8,logbsize=32k,noquota 0 1
# /dev/nvme0n1p1 LABEL=boot
UUID=1815-DD5D /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
Go
91.7%
Makefile
5.6%
Shell
2.7%