fstab is a configuration file that contains information of all the partitions and storage devices in your computer. The file is located under /etc, so the full path to this file is /etc/fstab.
Contains 6 fields.
/dev/hdb2 /home ext2 defaults 1 2
<device name> <mountpoint> <filesystemtype> <options> <dump> <fsckorder>
4th field options which mount options should use when mounting the filesystem.
Default = rw,suid,dev,exec,auto,nouser,async.
Sync/async: I/O operation to be done synchnously.
Suid/nosuid: Permit/Block the operation of suid, and sgid bits.
exec / noexec: Permit/Prevent the execution of binaries from the filesystem.
Dev/nodev : permits any user to mount the filesystem.
User: Any user can mont the filesystem
nouser: Only root user can mount the file system.
Exec/noexec: Permit/Prevent the execution of binaries from the filesystem.
Ro: Mount read only.
5th field (0) is used by dump (a backup utility) to decide if a filesystem should be backed up. If zero then dump will ignore that filesystem.
The 6th field (0) is used by fsck (the filesystem check utility) to determine the order in which filesystems should be checked.
If zero then fsck won’t check the filesystem.