Home > linux > How to: Mount usb device in Linux command line

How to: Mount usb device in Linux command line

Everyone knows this but I need to get reminded how to get this done without any gui interface. Basically if you have a usb flash device and you want to mount it on your Linux box, run the following commands as root:

# mkdir /tmp/flash
# mount /dev/sda1 /tmp/flash

Before you disconnect it, unmount first:

# umount /dev/sda1 /tmp/flash

All set.

Categories: linux Tags:
  1. July 30th, 2010 at 08:54 | #1

    If you’ve it installed, you can also use ‘pmount’ as a non-root user to mount /dev/sdx1 (or whatever) at /media/sdx1:

    $ pmount /dev/sdx1
    $ ls /media
    cdrom sdx1
    $
    $ pumount /dev/sdx1

  1. August 2nd, 2010 at 00:52 | #1