How can I tell which device the USB drive is assigned as?
Before inserting the USB drive:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p5 259:3 0 15.9G 0 part [SWAP]
├─nvme0n1p1 259:1 0 222.6G 0 part /
└─nvme0n1p2 259:2 0 1K 0 part
After:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 1.9G 0 disk
├─sda2 8:2 1 2.4M 0 part
└─sda1 8:1 1 1.2G 0 part
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p5 259:3 0 15.9G 0 part [SWAP]
├─nvme0n1p1 259:1 0 222.6G 0 part /
└─nvme0n1p2 259:2 0 1K 0 part
Is it /dev/sda
??
Best Answer
Simply use
lsblk
output options to find it out:which produces:
You can also use other options to get extra information (e.g: SIZE).
If you want a nice clean output use
-S
: