What keyword is missing in the following line from /etc/fstab in order to make a USB flash device writeable by the user fred when mounted:

/dev/sda1 /mnt/usbflash vfat defaults,users,______=fred,umask=022, 0 0

(Provide the option name only without any settings)

Answer: uid

题解

「/etc/fstab」设置档共有 6 个字段,分别是:

  • file system:设备名称(设备文件路径、UUID 或是 LABEL)。
  • mount point:挂载设备的文件路径。
  • type:设备的文件系统。
  • options:文件系统的参数。
  • dump:是否用 dump 来进行备份。
  • pass:挂载时是否使用 fsck 工具来检查文件系统。

可以透过在 vfat 文件系统的参数加上「uid=user id/name」来指定拥有者,或是加上「gid=group id/name」来指定拥有群组。