Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
2  
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

3 Answers 3

up vote 13 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

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:

NAME
       pumount - umount arbitrary hotpluggable devices as normal user

SYNOPSIS
       pumount [ options ] device

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

Your Answer

 
discard

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.