How to Find a USB Drive in Ubuntu: A Complete Guide

Plugging in a USB drive on your Ubuntu machine and seeing nothing happen can be frustrating.

Fortunately, Ubuntu provides several easy ways to detect your device, both with a graphical interface and the powerful terminal.

This guide will walk you through 5 simple methods to locate, access, and troubleshoot any USB stick or external hard drive.

The Easiest Method: Using the “Disks” GUI

For those who prefer a graphical interface, Ubuntu’s built-in “Disks” utility is the simplest way to see all connected storage devices.

  1. Click on the “Activities” overview in the top-left corner (or press the Super / Windows key).
  2. Type “Disks” and click the application icon to open it.
  3. On the left-hand pane, you will see a list of all drives connected to your system. Your USB drive will typically be identifiable by its manufacturer name and size (e.g., SanDisk Cruzer Blade, Kingston DataTraveler).

Once you click on your USB drive, Disks will show you a detailed breakdown of its partitions, size, and contents. If the drive is not mounted, you can even click the “play” button to mount it.

(Alt text: Ubuntu Disks utility showing a detected SanDisk USB drive on the left pane.)


Using the Terminal for Speed and Power

For a faster and more detailed approach, the terminal is your best friend. You can open it by pressing Ctrl+Alt+T. Here are the most effective commands.

Method 1: lsblk (The Best Command to Find Your USB)

The lsblk (list block devices) command gives you a clean, tree-like view of all your storage devices. It’s the most reliable way to identify your USB drive.

The best technique is to run the command before and after plugging in your drive.

See also: Mastering the Linux Command Line — Your Complete Free Training Guide

  1. Before plugging in the USB, open the terminal and run:
    lsblk


  2. Now, plug in your USB drive.
  3. Run the command again:
    lsblk


You will see a new device appear in the list. This is your USB drive! It will likely be named /dev/sdb, /dev/sdc, etc.

Example Output:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0 465.3G  0 part /
sdb      8:16   1  57.7G  0 disk  <-- This is your USB Drive
└─sdb1   8:17   1  57.7G  0 part /media/user/SANDISK

In this example, /dev/sdb is the USB device, and its partition /dev/sdb1 is automatically mounted at /media/user/SANDISK, meaning you can access its files there.

Why is it “sd”?
Even if it’s a USB device, the Linux kernel treats it as a SCSI-class block device, so it’s named sdX instead of something like udX.

If you want to confirm that sdb is indeed a USB device, you can use:

lsblk -o NAME,MODEL,TRAN

Example output:

NAME   MODEL            TRAN
sda    Samsung_SSD_860  sata
sdb    SanDisk_Ultra    usb

Here, sdb is a SanDisk Ultra USB storage device, confirmed by the usb in the TRAN column.

Method 2: dmesg (The System’s Event Log)

If lsblk doesn’t show your drive, dmesg is an excellent diagnostic tool. It prints messages from the Linux kernel, including events that happen when you plug in a new device.

Immediately after plugging in your USB drive, run this command:

dmesg | tail

The | tail part filters the output to show only the last few lines, which will contain information about your newly connected device.

You should see lines confirming a “USB Mass Storage device” was detected and what device name it was assigned (e.g., [sdb]).

Method 3: fdisk (The Advanced Check)

For a more technical report, you can use fdisk to list all partition tables. This can also help you detect a USB in Ubuntu.

sudo fdisk -l

Scroll through the output, and you will find an entry that matches your USB drive’s size and model.

What to Do After You Find Your USB Drive

In most cases, Ubuntu automatically “mounts” the USB drive, making its files accessible in the “Files” manager. The MOUNTPOINT column in the lsblk output tells you the exact folder where you can find your files.

If your drive is not mounted automatically, you can do it manually. First, find your device name (e.g., /dev/sdb1) with lsblk.

# 1. Create a mount point (an empty folder)
sudo mkdir /media/my-usb

# 2. Mount the partition to that folder
sudo mount /dev/sdb1 /media/my-usb

You can now access your files in the /media/my-usb directory. For more details on this process, you can consult the official Ubuntu Community documentation on mounting.

Troubleshooting: Ubuntu USB Drive Not Showing Up?

If you’ve tried the methods above and still can’t find your drive, here’s a quick checklist:

  1. Check Physical Connections: Is the USB drive properly plugged in? Try a different USB port on your computer. Some ports (like those on a keyboard) may not provide enough power.
  2. Test the Drive: Does the USB drive work on another computer? This helps determine if the issue is with the drive or your Ubuntu system.
  3. Check dmesg Output: Run dmesg | tail right after plugging it in. Even if it fails to mount, the kernel may still log an error message that can give you a clue.
  4. Check Formatting: The drive may be unformatted or formatted with a filesystem that Ubuntu doesn’t recognize by default. Open the Disks utility. If the drive appears there but shows “No Media” or an “Unknown” partition, it may need to be formatted. 

Frequently Asked Questions (FAQ)

Q: How do I know the device name of my USB in Ubuntu? A: The lsblk command is the best way. Run it before and after plugging in the device. The new entry that appears (e.g., /dev/sdb) is your USB’s device name.

Q: How do I access files on my USB from the terminal? A: First, find its mount point with lsblk. Then, use the cd command to change to that directory. For example: cd /media/user/SANDISK.

Q: How do I safely eject a USB drive from the Ubuntu terminal? A: Use the umount command with the device name or mount point. For example: sudo umount /dev/sdb1. Once the command completes, it’s safe to unplug the drive.

David Cao
David Cao

David is a Cloud & DevOps Enthusiast. He has years of experience as a Linux engineer. He had working experience in AMD, EMC. He likes Linux, Python, bash, and more. He is a technical blogger and a Software Engineer. He enjoys sharing his learning and contributing to open-source.

Articles: 544

Leave a Reply

Your email address will not be published. Required fields are marked *