So I have unmounted a usb external hard drive but I went to re-mount it. Is there a command that I can use to remount the drive? Only way I know to re-mount a drive is to disconnect the usb cable from my Mac and reconnect it.
diskutil mount `diskutil list | grep "Volume Name" | sed -n -e 's/^.* //p'`
Find the disk identifier:
diskutil list | grep "Volume Name"
4: Apple_HFS Volume Name 100 GB disk1s2
Mount the disk:
diskutil mount disk1s2
Disk Utility will let you remount any connected drives. Just
open it up (It is usually in Applications > Utilities)
select the drive
diskutil mount also accepts a volume name, so there is no need to grep the output of
diskutil list. If the disk has multiple volumes (like a Time Machine volume and another volume), you can use
diskutil mountDisk to mount all volumes:
$ diskutil mount WD Volume WD on WD mounted $ osascript -e 'tell app "Finder" to disks where ejectable is true' disk WD $ diskutil eject Untitled Disk WD ejected $ diskutil mountDisk WD Volume(s) mounted successfully $ osascript -e 'tell app "Finder" to disks where ejectable is true' disk Time Machine, disk WD
eject apply to all volumes even if you specify the name of one volume.
Alternate easy solution: In place of ejecting drive you should unmount it, and when needed mount it again.
Unmount / mount: Command F (Spotlight search) > Disk utility > Select drive > unmount / mount
After unmount, it's also safe to remove disk physically.
In addition to the answers already given, there is also a GUI app for this, which I really like: Mountain.
It's a $2 app that sits in the menu bar and keeps track of both mounted and unmounted drives. Unmounted drives can be remounted from there as well.
You can download a free trial from the website.
(Also note that once you install the Mac App Store version, there is an update available directly from the developer. I assume the update isn't on the Mac App Store because of Apple's sandboxing rules.)