How to find your SD card, HDD, SSD, or USB drive in Linux.

  • Post last modified:April 6, 2025
  • Reading time:3 mins read
  • Post comments:0 Comments

How to find your SD card, HDD, SSD, or USB drive in Linux.

When you plug in an SD card or USB drive, your system assigns it a device name like /dev/sdb, /dev/sdc, etc. To figure out which one it is, follow:

 

List All Drives 

Open a terminal and run:lsblk This shows a tree of all block devices (hard drives, SSDs, SD cards, USB sticks). Example output:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0  500G  0 disk
├─sda1   8:1    0  500G  0 part /
sdb      8:16   1  32G   0 disk
└─sdb1   8:17   1  32G   0 part /media/user/SDCARD

In this example:

  • sda is your main internal drive.

  • sdb is your SD card (or USB stick) — notice it’s removable (RM column = 1) and mounted in /media/....

⚠️ Be Careful
When writing to or formatting a drive, double-check the device name (like /dev/sdb) — using the wrong one could wipe your main hard drive.

 

What Does /dev/sda1, /dev/sda2, etc. Mean?

  • /dev/sda is the whole physical disk — for example, your internal hard drive, SSD, or SD Card.

  • /dev/sda1, /dev/sda2, /dev/sda3, etc., are partitions on that disk.

Think of sda as a book, and each sda1, sda2, etc., as a chapter.

Partition Numbering

  • Partition numbers start at 1.

  • So /dev/sda1 is the first partition on the disk, /dev/sda2 is the second, and so on.

  • These are numbered in the order they were created, not necessarily where they are physically on the disk.

Example

If you run: lsblk

You might see:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0  500G  0 disk
├─sda1   8:1    0  100G  0 part /
├─sda2   8:2    0  200G  0 part /home
└─sda3   8:3    0  200G  0 part /data

This means:

  • sda1 is a 100GB partition mounted as root /

  • sda2 is a 200GB partition for /home

  • sda3 is another 200GB partition for /data

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.