Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unmount my external hard drive in bash

Tags:

bash

unmount

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?

like image 590
Dennis Avatar asked Aug 06 '13 23:08

Dennis


People also ask

How do I unmount a drive in bash?

To unmount a mounted file system, use the umount command. Note that there is no “n” between the “u” and the “m”—the command is umount and not “unmount.” You must tell umount which file system you are unmounting.

How do I unmount an external hard drive in Linux terminal?

Unmount the drive using umount command. Note the spelling of umount as a common error is people type “unmount”. Using the umount command we only need to specify the mount point location and name of the drive we wish to unmount.

How do I unmount a USB drive in Linux?

If your USB device is mounted, you'll see its label next to a USB logo and an unmount icon. Click on the “Unmount” icon. When you select this icon, the Ubuntu file manager will automatically unmount your USB device. No hard work necessary!


1 Answers

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.

like image 173
SWPhantom Avatar answered Oct 21 '22 18:10

SWPhantom