Unmounting Filesystems
The umount command is used to detach previously mounted filesystems from their mount directories. The syntax used is similar to the mount command, but a typical command line can be much simpler. For instance, the following command unmounts a CD-ROM drive that was mounted using the example given earlier:
umount /mnt/cdrom
Note
If the unmounting procedure is to succeed, no one can be using the mount directory when you unmount a device or a mount directory. If anyone is accessing the mount directory, you get a busy device error, and the unmounting procedure fails. Be sure to back out of a mount directory before unmounting the device attached to it..
Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.