Defines how file systems can be mounted
/etc/fstab file is a configuration file used by the Linux operating system to define how various file systems should be
mounted and accessed by the system during boot time. It contains a list of entries, each of which describes a particular
file system and the options that should be used when mounting it.
Each entry in the
/etc/fstab file is composed of several fields separated by spaces or tabs. The fields are as follows:
File system: The device or partition that contains the file system to be mounted. This can be specified as a device name (e.g.
UUID(Universally Unique Identifier), or a label.
Mount point: The directory in the file system hierarchy where the file system should be mounted. This directory must exist and should be empty.
Mount options: A list of comma-separated options that specify how the file system should be mounted. These options may include permissions, ownership, and read/write access.
Dump: A binary value (
1) that determines whether the file system should be backed up by the dump utility.
Pass: A binary value (
1) that specifies whether the file system should be checked by the
fsckutility during system boot.
Here are a few examples of entries in the
/dev/sda1 / ext4 defaults 0 1
/dev/sdb1 /mnt/data ext4 defaults 0 2
This entry mounts the
/dev/sdb1 partition to the
/mnt/data directory with the
ext4 file system type
and default mount options. The
2 in the pass field specifies that the file system should be checked after the root file system
UUID=12345678-9abc-def0-1234-56789abcdef0 /media/backup ntfs defaults 0 0
This entry mounts the file system with the
12345678-9abc-def0-1234-56789abcdef0 as the
/media/backup directory using the
ntfs file system type and default mount options.
0 in the dump and pass fields specifies that the file system should not be backed up or checked during boot.
These are just a few examples of entries that can be found in the
/etc/fstab file. The actual contents of the file
will depend on the specific configuration of the system.