LX0-103 · Question #33
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 device is already listed in /etc/fstab with its mount point, the mount command only needs the mount point or device to complete the operation.
Question
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?
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
(27 responses)- B4% (1)
- D93% (25)
- E4% (1)
Why each option
When a device is already listed in /etc/fstab with its mount point, the mount command only needs the mount point or device to complete the operation.
Specifying both device and mount point explicitly works for ad-hoc mounts but is redundant and error-prone when fstab already contains the entry with /dev/hdd as the device.
This is a syntax error - there is no space between 'mount' and '/dev/cdrom', making it an invalid command.
The filesystem type flag '-t cdrom' is not a valid filesystem type; the correct type for ISO 9660 CD-ROMs is 'iso9660', making this command fail.
Because /mnt/cdrom is already defined in /etc/fstab with its corresponding device (/dev/hdd), the mount command can resolve all required parameters from that file using only the mount point. This is a key feature of fstab - it allows shorthand mounting by specifying either the device or the mount point alone, and the kernel fills in the rest.
'automount' is not a standard Linux utility; the correct tools for automounting are 'autofs' or 'amd', and the syntax shown is not valid for any of them.
Concept tested: Mounting devices using /etc/fstab entries
Source: https://man7.org/linux/man-pages/man8/mount.8.html
Topics
Community Discussion
No community discussion yet for this question.