MacMost Q&A Forum • View All Forum QuestionsAsk a Question

USB Unmount and Remount With Out Removing

Is there any way of using Terminal to unmount and remount a USB device with out removing it from the Mac?
—–
Nilesh Parmar

Comments: One Response to “USB Unmount and Remount With Out Removing”

    11 years ago

    Yes. For most people you will want to use the Disk Utility app to do this. See http://macmost.com/ejecting-and-remounting-external-drives.html
    But if you want to do it via the Terminal for some reason, here is how:
    You just use the diskutil command First use it to get the real path to the drive:
    diskutil list
    You get a list with items that look like /dev/disk4. "dev" stands for device. Listed under each device is the volumes it contains, which should use the names you gave them. So you should be able to identify which disk you want to unmount.
    Then you can use this to unmount a disk:
    diskutil unmount /dev/disk4
    Of course you would substitute the disk you want in place of disk4. You should also be able to use the volume name instead of the disk name. Though you might need to put quotes around it if it contains a space.
    To remount a disk or volume, just use:
    diskutil mount diskorvolumename
    You can read all about the diskutil terminal command here:
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/diskutil.8.html

Comments Closed.