LFCS · Question #846
You have just added a CD.ROM drive (/dev/hdd) to your system and have added it to yourfstab. Typically you can use which of the following commands to mount media in that drive to /mnt/cdrom?
The correct answer is D. mount /mnt/cdrom. When a filesystem is defined in /etc/fstab, mount can use the mount point as the only argument to automatically find and mount the associated device.
Question
Options
- Amount /dev/cdrom /mnt/cdrom
- Bmount/dev/cdrom
- Cmount -t cdrom /dev/cdrom /mnt/cdrom
- Dmount /mnt/cdrom
- Eautomount /mnt/hdd /mnt/cdrom
How the community answered
(25 responses)- C4% (1)
- D92% (23)
- E4% (1)
Why each option
When a filesystem is defined in `/etc/fstab`, `mount` can use the mount point as the only argument to automatically find and mount the associated device.
`mount /dev/cdrom /mnt/cdrom` would work if `/dev/cdrom` were the device, but the question specifies `/dev/hdd` and implies `fstab` setup.
`mount /dev/cdrom` is incomplete as it doesn't specify a mount point.
`mount -t cdrom /dev/cdrom /mnt/cdrom` specifies a filesystem type and device, which is unnecessary if already defined in `fstab`, and uses `/dev/cdrom` not `/dev/hdd`.
D is correct because if `/dev/hdd` is properly configured in `/etc/fstab` with `/mnt/cdrom` as its mount point, the `mount` command can simply be invoked with the mount point (e.g., `mount /mnt/cdrom`). The `mount` utility will then look up the details in `/etc/fstab` and mount the specified device (`/dev/hdd`) to that location.
`automount` is typically for network filesystems or hot-pluggable devices with an automounter service, not a direct command for a simple `fstab` entry.
Concept tested: Mounting filesystems from `/etc/fstab`
Source: https://man7.org/linux/man-pages/man8/mount.8.html
Topics
Community Discussion
No community discussion yet for this question.