-   Linux - Newbie (
-   -   using USB Flash drive in Linux (

Upendra Pratap Singh 05-10-2011 02:26 PM

using USB Flash drive in Linux
Whenever I insert a CD-ROM into the corresponding CD-ROM drive, my operating system (Linux Mint version 10) is able to read the CD- ROM.

The same thing is not happening in case I am pugging in the USB FlashDrive(pen drive); the operating system is not able to recognise my pen drive.

I have recently installed Linux Mint version 10(about 10 hours ago) and I am not well acquainted with linux.

Please help me with the required technical assistance.

I would also like to know if there are certain settings that we have to make to make the operating system read my pen drive.

Besides, I would also like to know if there is any mechanism in Linux, by virtue of which we can transfer data on to the USB Flash Drive.

T3RM1NVT0R 05-10-2011 02:40 PM

@ Reply
Hi there,

Well if you go in K button at the left hand bottom corner of Linux Mint KDE and click on that you will see options like Favorites, Applications, Computer etc. Click on Computer and it will show couple of options select Home Folder. When you open home folder on the left hand side it will show you all the drives. Check if you see your USB drive in there.

Another option of mounting usb drive is via command line but that will be a bit tricky if you have not worked with Linux before. Anyways here it is.

1. Connect USB to the system.
2. Click on K button at the left hand bottom corner and the first option you will see is Terminal (Kconsole). Click on that and it will open up command line console for you.
3. Type "df -h" without quotes, hit enter and see what are the devices that are currently mounted. It will display the output something like /dev/sdb1 size of the disk /
4. Type "cd /dev/" without quotes and hit enter.
5. Type "ls -l | grep sda" without quotes and hit enter. See what are the devices showing up. Ignore the ones that are already mounted. Look for a device that is not mounted. Say /dev/sda5
6. Type "mount /dev/sdax /media" without quotes and hit enter. Remember the x after sda will be the partition number that you have identified from step 5.
7. Now you have your USB drive mounted.

To copy any file to your USB drive issue the following command:

cp -arv /source_file /media

where source_file will be the file that you are trying to copy and /media is your USB mount point where you want to copy the file.

Once the copy is done you can unmount USB by the following command:

umount /media

camorri 05-10-2011 02:54 PM

It sounds like your pen drive is not mounted. These devices look like an exernal hard drive to linux.

Some things to try. Open a terminal, and run the command 'lsusb' ( without the quotes ). You should get a listing of attached USB devices. The pen drive should be listed. Here is what it will look like.


Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0461:4d03 Primax Electronics, Ltd Kensington Mouse-in-a-box
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0781:5530 SanDisk Corp.
Bus 001 Device 003: ID 5986:0182 Acer, Inc
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The SanDisk is my pen drive. If it does not show up, then you may have a driver problem. If it shows up, try to mount it.

This takes root user. You need a directory to mount it to. Most distros give you an empty directory called /media for this purpose. The command would be;

'sudo mount /dev/sr0 /media/sr0' ( no quotes ). sr0 is the device, this gets created when you hot plug the stick. It may be a different device on your system. To find out, go to the /dev dir. Type 'sr' and press tab, twice. That will list all occurrences of sr. Success is indicated by no response from the system. Do a cd /media and then a ls command. You should see the files on the stick.

You don't need any special programs for USB sticks. Any file manager will work.

Hope this helps.

All times are GMT -5. The time now is 05:44 PM.