Linux: terminal: navigating to a USB drive

The tutor gives a few hints about navigating a USB drive from the Linux terminal.

I’m no Linux expert, but I can find my way around well enough. Remembering that a directory is analogous to a folder, I mainly use

pwd shows where you are (print working directory)

ls shows the files and other directories within your present one

cd .. backs you up one level (cd for change directory)

cd directory_name places you in that directory

The potential problem with a USB drive: do you know where it is (or what it’s called)?

When I plug in a USB, I can find it in the media directory, visible from the top level directory. However, when I invoke the terminal, it doesn’t put me at the top level directory but rather at my home directory. I have to back up a couple of levels to reach the top directory. From there, I can enter ls, then see the media directory among the listings.

The media directory can then be entered:

cd media

Checking its contents thus:

ls

you might see a list of users rather than the USB drive itself. Entering your own directory

cd my_user_name

you might then list its contents

ls

to find the USB drive. The computer might give it a name based on its model number rather than a recognizable handle. You can enter it to confirm it’s the device you’re expecting.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Tagged with: , , , ,

Leave a Reply