Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know how to umount my USB drive via command line. I am using Ubuntu 12.04 LTS 32-bit.

share|improve this question
Have you looked at man umount? – jasonwryan Aug 19 '12 at 8:14
Do you want to umount it via commandline or using a graphical interface? – student Aug 19 '12 at 8:20
via command-line – Pranit Bauva Aug 19 '12 at 8:27
up vote 28 down vote accepted

Suppose your usb drive is mounted to /media/usb then it would be sufficient to do

sudo umount /media/usb

Suppose the your usb is /dev/sdb1 then you could also do

sudo umount /dev/sdb1

You may also have a look at the anwers of one of my questions, how to umount all attached usb devices with a single command: Umount all attached usb disks with a single command

share|improve this answer
It just works! Thanks a lot! – Pranit Bauva Aug 19 '12 at 8:40
The command sudo fdisk -l can be helpful if you don't know where a drive is mounted. – Brian Z Mar 13 '15 at 4:12

You can also use

udisks --unmount /dev/sdb1

which does not require root.

share|improve this answer

Better than using sudo to unmount as root, just do:

pumount /media/usb

As man pumount says:

       pumount - umount arbitrary hotpluggable devices as normal user

       pumount [ options ] device

       pumount  is  a wrapper around the standard umount program which permits
       normal users to umount removable devices without a matching  /etc/fstab
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.