Unmount my external hard drive in bash

Dennis picture Dennis · Aug 7, 2013 · Viewed 14.4k times · Source

So, this should apparently be really simple, but had trouble finding any good answers online.

I have a mounted external usb hard drive.

I would like to unmount it, using bash. (Essentially I'm just looking for the equivalent bash command for right clicking on my external hard drive in nautilus and selecting 'unmount')

How can I achieve this?

Answer

SWPhantom picture SWPhantom · Aug 7, 2013

Searching for "Unmount Hard Drive Terminal" yields http://ubuntuforums.org/showthread.php?t=842698.

russlar provides a solution:

open terminal, and run df -h. this will tell you all the hard drives mounted. then, run sudo umount /dev/<something>, where <something> is the name of the hard drive that you want to unmount.