Consider the following /etc/fstab file:
/dev/hda1 swap swap defaults 0 0 /dev/hda2 / ext2 defaults 1 1 /dev/hda3 /home ext2 defaults 1 2 none /proc proc defaults 0 0 /dev/sdb1 /media/usb0 vfat user,noauto 0 0
What is one of the possible commands that an ordinary (non-root) user can use to mount the /dev/sdb1 partition on the /media/usb0 mount point? (Please enter the command with all parameters and/or options but without any file system type options.)
Answer: mount /dev/sdb1 或 mount /media/usb0 或 /bin/mount /dev/sdb1 或 /bin/mount /media/usb0 或 mount /media/usb0/ 或 /bin/mount /media/usb0/
题解
由于「/dev/sdb1」在「/etc/fstab」文件中使用了「noauto」参数,因此在开机时不会被自动挂载,且它还使用了「user」参数,因此可以被非 root 的用户来挂载。手动挂载文件系统可以使用「mount」(/bin/mount)指令,且因为「/dev/sdb1」设备和其要挂载的目录「/media/usb0」都已经被撰写在「/etc/fstab」文件中,因此可以不必明确指定挂载「/dev/sdb1」设备或是「/media/usb0」目录时是要使用哪个设备或是目录。
所以以下的几个指令都可以完成挂载:
mount /dev/sdb1
mount /media/usb0
mount /media/usb0/
