Published Jan 07, 2022
[
 
]
The fstab(5) file can be used to define how disk partitions, various other block devices, or remote file systems should be mounted into the file system.
Each file system is described in a separate line. These definitions will be
converted into systemd mount units dynamically at boot, and when the
configuration of the system manager is reloaded. The default setup will
automatically fsck and mount file systems before starting services that need
them to be mounted. For example, systemd automatically makes sure that remote
file system mounts like NFS or Samba are only started after the network has been
set up. Therefore, local and remote file system mounts specified in /etc/fstab
should work out-of-the-box. See systemd.mount(5) for details.
The mount
command will use fstab, if just one of either directory or device is
given, to fill in the value for the other parameter. When doing so, mount
options which are listed in fstab will also be used.
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdc3 UUID=3d746d56-3742-4003-b4e2-2aad9c72e60b
/dev/sdc3 / ext4 noatime 0 1
# /dev/sdc1 UUID=F532-5488
/dev/sdc1 /boot vfat defaults,noatime 0 2
# /dev/sdc2 UUID=90a16e80-09c8-4d44-971a-bb708e46bea9
/dev/sdc2 none swap sw 0 0
noatime
option fully disables writing file access times to the drive every time you read a file. This works well for almost all applications, except for those that need to know if a file has been read since the last time it was modified. The write time information to a file will continue to be updated anytime the file is written to with this option enabled.