How to Access a Pen Drive in Linux

A pen drive, also referred as a "jumpdrive" or "USB flash drive," is a USB flash memory device. It is commonly used to quickly transfer various data between computers that often have different operating systems. The Windows operating system usually automatically detects a USB flash drive, and it becomes acceptable instantly. However, in Linux, a pen drive needs to be mounted as a file system.

Things You'll Need

  • Superuser (root) password
Show More

Instructions

    • 1

      Right-click the mouse on the Desktop and choose "Open Terminal" from the pop-up menu.

    • 2

      Type "su" and press "Enter." Then type your root password and press "Enter" to get administrator (root) privileges.

    • 3

      Type "cd /mnt" and press "Enter."

    • 4

      Type "mkdir usb" and press "Enter" to create a USB directory.

    • 5

      Type "cd /etc" and press "Enter."

    • 6

      Type "cp fstab fstab_original" and press "Enter" to back up the original fstab file.

    • 7
      Steps 2 to 7.

      Type "nedit fstab" and press "Enter" to edit the fstab file.

    • 8

      Add the following line at the end of the fstab file in the nedit editor:
      /dev/sdc1 /mnt/usb auto noauto,user,rw 0 0

    • 9

      Click "File" > "Save" to save the file. Then click "File" > "Exit" to exit nedit.

    • 10

      Type "exit" and press "Enter" to exit the root shell.
      Note: Steps 2 to 10 are only a one-time procedure. Once they are done, always start from the Step 11.

    • 11

      Insert a pen drive into a USB port.

    • 12

      Type "mount /mnt/usb" and press "Enter."

    • 13

      Type "cd /mnt/usb" and press "Enter." Type "ls" and press "Enter" to list the pen drive content.

    • 14

      Click on the USB folder icon, which should appear on the Desktop, to access the drive content.

    • 15

      Unmount a pen drive by closing all files and folders that were used on the drive.

    • 16

      Type "umount /mnt/usb" and press "Enter."

    • 17

      Remove the pen drive from the USB port.

Tips & Warnings

  • The latest Linux versions may automatically mount a USB device. If it happens, skip Step 12. However, this step is necessary to mount an unmounted device again (after Step 16).

  • Step 12 results in the error message "mount: special device /dev/sdc1 does not exist" if there is no pen drive in the USB port.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured