Study for the TestOut Linux Pro Exam with our engaging quiz. Prepare using our flashcards and comprehensive multiple choice questions, each with hints and explanations to help you succeed. Get ready for your Linux certification today!

Practice this question and more.


To unmount a mounted drive, which command would you use?

  1. mount /dev/sdb2 /mnt/newdrive

  2. umount /mnt/newdrive

  3. mount /dev/sdb2

  4. swapon /dev/sdb2

The correct answer is: umount /mnt/newdrive

To unmount a mounted drive, the command used is specifically designed to detach a filesystem from the filesystem hierarchy. The command `umount` (note the spelling without an 'n') is utilized for this purpose, requiring the target mount point or the device's name as an argument. In this case, using `umount /mnt/newdrive` effectively instructs the system to unmount the drive that has been mounted at the specified mount point, ensuring that it is safely detached from the system. Unmounting is an important operation that prevents data loss and ensures that any pending operations on the filesystem are properly completed before the drive is removed or powered down. By contrast, the other commands listed either mount a drive, which is the opposite operation, or relate to managing swap space, which is unrelated to unmounting filesystems.