File System Table Configuration
The /etc/fstab file is a system configuration file that contains information about filesystems and their mount points. It defines how disk partitions, various other block devices, or remote filesystems should be mounted into the filesystem at boot time.
Each line in fstab contains six fields separated by whitespace:
| Field | Description | Example |
|---|---|---|
| Device | Device to mount (UUID, LABEL, or device path) | /dev/sda1, UUID=abc123 |
| Mount Point | Directory where device will be mounted | /, /home, /mnt/data |
| Filesystem Type | Type of filesystem | ext4, ntfs, swap |
| Options | Mount options (comma-separated) | defaults, rw,noatime |
| Dump | Backup operation (0=no, 1=yes) | 0, 1 |
| Pass | Filesystem check order (0=no check) | 0, 1, 2 |
| Option | Description |
|---|---|
defaults |
Use default options (rw, suid, dev, exec, auto, nouser, async) |
rw / ro |
Mount read-write / read-only |
noatime |
Don't update access times (improves performance) |
user / nouser |
Allow / disallow ordinary users to mount |
auto / noauto |
Mount automatically / manually at boot |
exec / noexec |
Allow / disallow execution of binaries |
suid / nosuid |
Allow / disallow suid and sgid bits |
dev / nodev |
Allow / disallow device files |
sudo cp /etc/fstab /etc/fstab.backup, then edit with sudo privileges. Test changes with mount -a before rebooting to avoid boot issues.
mount -o remount,rw /, then either restore your backup or edit the problematic entries in /etc/fstab.