How to Mount USB Disk Drive in UNIX or Linux

Most distros (distributions) of Linux include Mandrake 10.1, SuSE 9.x and Fedora Core 3 can now support plug-and-plug detection, discovery and driver installation for portable USB drive or USB disk (and any type of USB-based data storage devices devices such as hard drives, pen drives, USB keys, flash disk, thumb drive, memory key, USB zip drive and memory stick). Some Linux operating system even can auto-mount the USB drives, especially if you’re using Gnome and KDE. When you plug-in the USB disk, Linux will pop-up a window showing the content of USB disk just like Microsoft Windows.

However, if you’re using older version of Linux, or using UNIX operating system, or your Linux distro installation unable to detect and mount the USB storage device automatically, then you will have to manually install and mount the USB drive.

To manually mount a USB disk or USB drive or USB device in Linux or UNIX:

  1. Login as root. You can use the su command to switch to root user.
  2. Create a folder /mnt/USB with the command: mkdir /mnt/USB
  3. Add the following line in the file /etc/fstab (fstab is the file that tells Linux where to mount the various devices, and thus simplying the mount command):

    /dev/sda1 /mnt/USB auto noauto,owner,kuzu 0 0

    Note: The “auto” on the above line means auto detection of filesystem. If your system unable to determine the filesystem type, change it accordingly to the USB drive’s filesystem (e.g. vfat or ntfs or ext2 or ext3).

  4. Mount the USB storage device with the following command: mount /dev/sda1

Without the need modifying fstab (step 3), you can also straight away issue the mount command (step 4) with the following syntax:

mount /dev/sda1 /mnt/USB

If you know the filesystem of the USB drive or the system unable to determine the correct filesystem, the -t option can be used to the filesystem type of the USB device:

mount -t vfat /dev/sda1 /mnt/usb (for vFAT filesystem)
mount -t ntfs /dev/sda1 /mnt/usb (for NTFS filesystem)

Sometimes, the USB drive or USB storage device is detected by the system but been assigned a different device name from sda1. If so, the correct device name need to be determined by viewing and OS log file. Usually the Linux and UNIX boot and log message is stored in /var/log/messages, and you can view the log messages with the following commands:

tail -f /var/log/messages

or

dmesg

Check for the name of the device that appears after operating system detects the USB devices.

After using the USB disk, remember to unmount the USB drive with the following command to avoid any possible loss to the data or changes and risk messing up your partition.

umount /mnt/USB

Configure Gnome to automatically detect, install and mount USB drive

If you’re using Gnome yet unable to automatically detect and mount USB drive for usage, a few packages needed to be install. The packages to install are dbus, hald and Gnome-Volume-Manager. After installing these packages, configure dbus and hald setup to run via init scripts. Then in Gnome, some configuration has to be done. Click on the ‘Desktop’ menu, then go to ‘Preferences’, and then to ‘Removable Drives and Media’. Configure the settings to your liking. Once you plug-in a usb drive, an icon for the drive will appear on the desktop. Other possible setting is to have Gnome opens a window showing the contents of the USB drive.

Share and contribute or get technical support and help at My Digital Life Forums.



6 Responses to “How to Mount USB Disk Drive in UNIX or Linux”

  1. Gervase Chavasse
    January 24th, 2007 17:18
    1

    Thanks for an excellent article. But after upgrading to Suse 10.1 (10.2 wouldn’t install), I cannot access my USB Iomega ZIP drive and receive msg “Mount with signature “ssas” on interface “org.freedesktop.Hal.Device.Volume” doesn’t exist”. It seems that the introduction of HAL has complicated matters and I have been unable to find an answer on the forums. Can you help, please, perhaps with an updated article? All my back-up data is on the ZIP which is unreadable either by Windows or Knoppix.

  2. Ogryzek
    February 17th, 2007 11:25
    2

    Please note that there is a small typo in the main article above.

    /dev/sda1 /mnt/USB auto noauto,owner,kuzu 0 0

    Should read:

    /dev/sda1 /mnt/USB auto noauto,owner,kudzu 0 0

    Still, the article did help… thanx

  3. admin
    February 17th, 2007 13:42
    3

    I believe kuzu would work, kudzu is kind of for cdrom.

  4. BlogSplat » Blog Archive » Adventures In Linuxland
    August 10th, 2008 16:03
    4

    [...] I eventually find a helpful post that explains in better detail than most how mounting volumes [...]

  5. David
    August 13th, 2008 05:44
    5

    When I mount dev/sda1 it mounts my main filesystem drive not the usb. I can’t get my usb to mount no matter what I do (running Ubuntu) but windows reads it fine.

  6. Jacques
    September 27th, 2008 13:25
    6

    In reply to David. If you have a sata hdd that would be /dev/sda1. If this is the case your usb drive would most probably be /dev/sdb1 Do dmesg to see how your usb is recognised when plugged in.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

ubuntu mount usb - mount usb ubuntu - mount usb disk - ubuntu mount usb drive - mount usb drive ubuntu - ubuntu mount usb device - linux mount usb disk - ubuntu usb mount - mount usb disk ubuntu - ubuntu mount usb hard drive - ubuntu mount usb disk - fedora mount usb drive - mount USB linux - linux usb disk - mount usb - usb disk linux - linux mount usb - unix mount usb - usb mount - mount usb unix - linux mount usb drive - mounting usb ubuntu - mount usb fedora - usb mount ubuntu - mount usb device ubuntu - ubuntu usb drive mount - mount usb hard drive ubuntu - mount usb drive unix - ubuntu mounting usb - UNIX mount usb drive - mount thumb drive linux - ubuntu mount external usb drive - mount usb drive fedora - ubuntu mount usb hdd - mount usb drive linux - ubuntu mount usb - usb unix - mount usbdisk - all - usb disk mount - mount usb on ubuntu - mount usb in linux - fedora mount usb - how to mount usb in linux - ubuntu automount usb drive - how to mount usb disk - mount usb drive in unix - how to mount usb drive in ubuntu - mount external usb drive ubuntu - ubuntu mount usb harddrive - mounting a USB drive in Ubuntu - mount USB drive - mounting usb drive ubuntu - vmware mount usb drive - fedora mount usb disk - mount usb drive in fedora - montare usb ubuntu - automount usb drive ubuntu - how to mount usb drive in linux - mount usb drive in linux - how to mount usb ubuntu - unix usb - Ubuntu USB mounten - ubuntu how to mount usb drive - linux on usb disk - ubuntu auto mount - mount usb in ubuntu - mount usb drive in ubuntu - mount ubuntu usb - usb drive mount ubuntu - how to mount usb on linux - mount usb harddrive ubuntu - mount usb ubuntu - unix usb drive - mount usb on unix -