usb name in /dev

Andrew Haley aph at redhat.com
Wed Dec 15 12:28:31 UTC 2010


On 12/15/2010 12:23 PM, community help wrote:

> How can I know the name of my usb key (i have 2 ports, i want to know the name of the one that is pluged in), in the /dev directory.

dmesg is probably the easiest.  Plug in a usb device, and type "dmesg:tail"
Like this:

# dmesg|tail
scsi 3:0:0:0: Direct-Access     Kingston DataTraveler G2  1.00 PQ: 0 ANSI: 2
sd 3:0:0:0: Attached scsi generic sg2 type 0
sd 3:0:0:0: [sdb] 31309760 512-byte logical blocks: (16.0 GB/14.9 GiB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 16 24 09 51
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Assuming drive cache: write through
  sdb: sdb1 sdb2 < sdb5 >
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Attached SCSI removable disk

Or use "lsusb".

Andrew.


More information about the users mailing list