How to access, read, write, or mount a USB flash drive in Ubuntu Linux

My most viewed blog post is about how to access a flash drive on Ubuntu Linux. Written five years ago, it is my most-viewed post ever. For example, it now accounts for over a third of my views each day. [1]

This suggests that lots of folks are still having problems using flash drives on Ubuntu, and possibly other Linux distributions as well

The post is a bit dated. A lot has changed in the last five years, so here’s an update on how I currently access flash drives on my Ubuntu 12.04 desktop.

When you first put a flash drive into the computer all you will see is the light on the flash drive come on, if it has one.

If you do

$ ls /media

you won’t see any sign of the drive.

So what you do next is to open File Manager. It’s right there near the top of the main menu. It should show the flash drive. All the drives I have come with a built-in id, and File Manager will display it near the top of its page. Look for text that begins with /media/.

For example, I just plugged in a drive while writing this. It has the id 054A-FDA0.

Leave File Manager running, while you access the drive

If you again do

$ ls /media

you should see the drive. For example, I just did and found the file /media/054A-FDA0.

You can now do things like

$ cp /media/054A-FDA0/work.tar .

and so on.

It is good form to close the drive when you are done using it. This is not really needed if you are just reading the drive, but is important if you have written data to it. You want to know all the data has been written.

There are two ways to do what in Linux is called “unmounting” the flash drive.

One is

umount /media/054A-FDA0

Note the command is “umount” and not “unmount”. This is one case where Unix terseness, in this case saving a single letter, did more harm than good.

Another is to go back to File Manager, find the symbol for the drive in the left column, and right click your mouse on it. You will get a list of options, one of which is Eject Removable Medium. Then pick that, and remove the drive

Either will work. You make the call.

By the way, whenever you are typing a command that includes the flash drive id, as soon as you have typed the first letter or so, you should hit the Tab key. The shell will then complete the rest of the name for you.

(This is true whenever you are entering a file name. It’s one of the very nice features of Linux: thoughtful people have worked hard to make your work easier.)

Notes:

1 The second most-viewed post is A Brief History of Operating Systems, based on a couple of days of writing done while I was at IBM. Steve Mills, then and now head of IBM’s Software Group, felt that his salesmen didn’t know enough about this topic, and asked that someone put something together. The request landed on my desk, and not having anyone else I could kick it down the road to, I had to do it myself. [2]

2. One of the sagest observations I have ever heard came from Ralph Griswold, in a conversation almost forty years ago:

I wish I had done it myself. In the long run I always do.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

  • Pages

  • August 2012
    M T W T F S S
    « Jul   Sep »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • RSS The Wayward Word Press

  • Recent Comments

    russurquhart1 on SPITBOL for OSX is now av…
    dave porter on On being the maintainer, sole…
    daveshields on On being the maintainer, sole…
    Paul Tallett on On being the maintainer, sole…
    mrrdev on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated

  • %d bloggers like this: