Identify USB Driver. Ubuntu, Debian, Mint, CentOS, Fedora & all Linux distro

This guide shows how you can identify USB Driver Chipset(most commonly Wireless) Information on Linux. Often users troll different forums and blogs to find out they can identify which driver their PCI or USB device is using. This guide applies to all possible scenarios. After reading and following this guide you will be able to identify the followings:

Examples of USB devices

  1. USB Wireless Adapters
  2. Mouses
  3. Keyboards
  4. External Hard drives
  5. Card readers etc.

In short, any device drivers can be identified that is using plugged into a USB port. This guide will work for any Linux distributions, namely –

  1. Linux Mint
  2. Ubuntu
  3. Debian GNU/Linux
  4. Mageia / Mandriva
  5. Fedora
  6. openSUSE / SUSE Linux Enterprise
  7. Arch Linux
  8. CentOS / Red Hat Enterprise Linux
  9. PCLinuxOS
  10. Slackware Linux
  11. Puppy Linux
  12. Kali Linux (my distro ;) )

As usual, I will start with basics first. next few paragraphs are slightly boring but if you really want to understand, you might as well read them, otherwise just skip to the technical bits. Table of contents above.

So let’s start with the basics .. what is a an USB device…

What is Universal Serial Bus or USB?

Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication, and power supply between computers and electronic devices.

USB was designed to standardize the connection of computer peripherals (including keyboards, pointing devices, digital cameras, printers, portable media players, disk drives and network adapters) to personal computers, both to communicate and to supply electric power. It has become commonplace on other devices, such as smartphones, PDAs and video game consoles. USB has effectively replaced a variety of earlier interfaces, such as serial and parallel ports, as well as separate power chargers for portable devices. Source: Wikipedia

Question: How do I identify USB driver for anything in Linux?

This is a million dollar question, just how often you see a similar post in forums and blogs with vague and unreliable answers? I will try my best to answer anything and everything in this post about all devices and their drivers in here. So, stay tuned as this is going to a long a** post.

Identify USB Driver Chipset Information in Linux

lsusb which is a standard command in all Linux distribution will show you the PCI devices on your system.

LS = List

USB = Universal Serial Bus devices

Step 1: List all USB devices – Identify USB driver

root@kali:~# lsusb

This will give you a sample output like the following:

root@kali:~# lsusb
Bus 002 Device 003: ID 148f:2870 Ralink Technology, Corp. RT2870 Wireless Adapter
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@kali:~# 

Identify USB Driver - lsusb to list all USB devices - blackMORE Ops - 1

Now you can see the device names, types etc. But unlike, lspci, it doesn’t give you that funky number at the front.

Step 2: Dump the physical USB device hierarchy as a tree – Identify USB driver

For some reason, USB devices were listed slight different. So similar commands like this was useless

root@kali:~# lsusb -vv -s 148f:2870

I could use the actual device serial to get lot’s of info

root@kali:~# lsusb -vv -s 003

But this again doesn’t have the ACTUAL driver info.

root@kali:~# lsusb -vv -s 003

Bus 002 Device 003: ID 148f:2870 Ralink Technology, Corp. RT2870 Wireless Adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x148f Ralink Technology, Corp.
  idProduct          0x2870 RT2870 Wireless Adapter
  bcdDevice            1.01
  iManufacturer           1 Ralink
  iProduct                2 802.11 n WLAN
  iSerial                 3 1.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              450mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           7
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              5 1.0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

So I found a different way to list the driver. I used lsusb -t to dump the physical USB device hierarchy as a tree.

root@kali:~# lsusb -t

This was actually great as most computers got just 3/4 USB devices plugged in at anytime. (i.e. Keyboard, Mouse and USB Wireless Adapter etc.). In my case I had just 2 device plugged in.

So my lsusb -t output looks very small and shows me exactly what I wanted to see.

root@kali:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
        |__ Port 5: Dev 3, If 0, Class=vend., Driver=rt2800usb, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
        |__ Port 4: Dev 4, If 0, Class=HID, Driver=usbhid, 1.5M
root@kali:~# 

Identify USB Driver - lsusb -t gives driver info - blackMORE Ops - 2

And there you go.. My USB driver in use is rt2800usb.

That mean the Kernel is using a USB driver named rt2800usb.

Step 3: Get driver info for selected device – Identify USB driver

Now to get the full details of the driver you issue the following command:

root@kali:~# modinfo rt2800usb

This will list everything and anything for that driver including the driver file.

root@kali:~# modinfo rt2800usb
filename:       /lib/modules/3.14-kali1-amd64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
license:        GPL
firmware:       rt2870.bin
description:    Ralink RT2800 USB Wireless LAN driver.
version:        2.3.0
author:         http://rt2x00.serialmonkey.com
srcversion:     8D709655B6AD993F0D5ACC4
alias:          usb:v20F4p724Ad*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v148Fp5572d*dc*dsc*dp*ic*isc*ip*in*
depends:        rt2x00lib,rt2800lib,rt2x00usb,usbcore
intree:         Y
vermagic:       3.14-kali1-amd64 SMP mod_unload modversions 
parm:           nohwcrypt:Disable hardware encryption. (bool)
root@kali:~#

Identify USB Driver - modinfo drivername shows more details - blackMORE Ops - 3

So the driver file used for this particular USB Wireless Adapter is:
filename: /lib/modules/3.14-kali1-amd64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
Now we know the device name, driver used, driver filename, vendor, publisher, dependencies, license and Author details for the selected USB device (USB Wireless Adapter).

Step 4: More ways to Identify USB driver details

We can use other tools to find USB driver used for a specific device..

Step 4.1: Identify USB driver using lshw command

lshw is another command that can be used to list hardware info.

ls = List

hw = Hardwares

First you need to install lshw in your Linux system. Install using the following command:

root@kali:~# apt-get install lshw

Now list all hardware and detailed info using the following command

root@kali:~# lshw

lshw will give you anything and everything. If you want you can browse through the outputs and you will find all the things you will ever need for a particular device.However, this is tedious job.

We can actually narrow it down using CLASS.

Some classes you can use are:

  1. Display
  2. Multimedia
  3. Network etc.

For VGA/Display related output, you can use -C Display with lshw command.

root@kali:~# lshw -C Display

For Audio/Multimedia related output, you can use -C Multimedia with lshw command.

root@kali:~# lshw -C Multimedia

For Network related output, you can use -C Network with lshw command.

root@kali:~# lshw -C Network

So to find more info using lshw for this Ralink RT2800 USB Wireless adapter we will use the following command:

root@kali:~# lshw -C Network

This will give you an output similar to below:

root@kali:~# lshw -C Network
  *-network
       description: Wireless interface
       physical id: 1
       bus info: usb@2:1.5
       logical name: wlan0
       serial: 00:60:64:37:4a:30
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt2800usb driverversion=3.14-kali1-amd64 firmware=0.29 ip=10.0.0.4 link=yes multicast=yes wireless=IEEE 802.11bgn

Identify PCI Driver - lshw -C Network - blackMORE Ops - 4

As you can see, it lists the driver name as well. We can get more details on that driver using modinfo now.

root@kali:~# modinfo rt2800usb

Step 4.2: Identify USB driver using GTK+ front-end for lshw

and finally last but not the least, lshw also got a GUI version (lshw-gtk). Install that if you don’t want to use command line tools.

root@kali:~# apt-get install lshw-gtk

Launch GTK+ front-end for lshw using the following command on terminal

root@kali:~# lshw-gtk &

Refresh the window and you will see everything as per order. Double-click to expand each section.

Identify PCI Driver - lshw-gtk GTK Front-end for LSHW - blackMORE Ops - 5

Note: Once you’ve identified the driver name, you need to use modinfo <driver-name> to extract the details.

root@kali:~# modinfo rt2800usb

Step 4.3: Identify USB driver using dmesg

Last but not the least, this is another way to identify which driver your Linux installation is using for a particular USB pluggable device.

So I’ve got an ALFA AWUS036H USB 802.1b/g Long-Range Wireless USB Adapter. Following is how you use dmesg

root@kali:~# dmesg

Now I will be using “dmesg | tail” command as we only want the last few lines from dmesg. BTW in case you’re wondering, dmesg will print the Linux kernel ring buffer messages.

root@kali:~# dmesg | tail
[85452.720179] usb 2-1.8: USB disconnect, device number 5
[85514.996934] usb 1-1.4: USB disconnect, device number 5
[85526.132402] usb 1-1.4: new low-speed USB device number 6 using ehci-pci
[85526.204445] usb 1-1.4: device descriptor read/64, error -32
[85526.405449] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c016
[85526.405455] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[85526.405459] usb 1-1.4: Product: Optical USB Mouse
[85526.405462] usb 1-1.4: Manufacturer: Logitech
[85526.408538] input: Logitech Optical USB Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C016.0004/input/input17
[85526.409084] hid-generic 0003:046D:C016.0004: input,hidraw0: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-0000:00:1a.0-1.4/input0
root@kali:~#

Identify USB Driver - dmesg shows last plugegd in device details - blackMORE Ops - 4

As you can see the last USB device plugged in was my USB Mouse (which is using hid-generic driver.)

Now let’s plug in my ALFA AWUS036H USB 802.1b/g Long-Range Wireless USB Adapter and use this same “dmesg | tail” command.

root@kali:~# dmesg | tail
[91238.551066] usb 2-1.8: New USB device found, idVendor=0bda, idProduct=8187
[91238.551073] usb 2-1.8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[91238.551077] usb 2-1.8: Product: RTL8187_Wireless
[91238.551080] usb 2-1.8: Manufacturer: Manufacturer_Realtek_RTL8187_
[91238.551084] usb 2-1.8: SerialNumber: 00C0CA554C3E
[91238.849020] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
[91238.849293] ieee80211 phy3: hwaddr 00:c0:ca:55:4c:3e, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
[91238.870650] rtl8187: Customer ID is 0xFF
[91238.871388] rtl8187: wireless switch is on
[91241.316186] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
root@kali:~#

Identify USB Driver - dmesg showing driver details for last plugged in USB device - blackMORE Ops - 5

So there you go, dmesg picked the newly plugged in ALFA AWUS036H USB 802.1b/g Long-Range Wireless USB Adapter and spewed some lines in there. So which one is the driver? In my case it is using rtl8187 driver.

We can double check it using both “lsusb -t” and “lshw -C Network” command

root@kali:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
        |__ Port 5: Dev 3, If 0, Class=vend., Driver=rt2800usb, 480M
        |__ Port 8: Dev 6, If 0, Class=>ifc, Driver=rtl8187, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
        |__ Port 4: Dev 6, If 0, Class=HID, Driver=usbhid, 1.5M
root@kali:~#

Identify USB Driver - lsusb -t showing driver details for all plugged in USB devices - blackMORE Ops - 6

and

root@kali:~# lshw -C Network
  *-network:0
       description: Wireless interface
       physical id: 1
       bus info: usb@2:1.8
       logical name: wlan1
       serial: 00:c0:ca:55:4c:3e
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rtl8187 driverversion=3.14-kali1-amd64 firmware=N/A link=no multicast=yes wireless=IEEE 802.11bg
root@kali:~#

See my list of supported Wifi Adapters that’s supported for injection and monitor mode — > 802.11 Recommended USB Wireless Cards for Kali Linux

A modinfo will show more:

root@kali:~# modinfo rtl8187
filename:       /lib/modules/3.14-kali1-amd64/kernel/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko
license:        GPL
description:    RTL8187/RTL8187B USB wireless driver
author:         Larry Finger <Larry.Finger@lwfinger.net>
author:         Hin-Tak Leung <htl10@users.sourceforge.net>
author:         Herton Ronaldo Krzesinski <herton@mandriva.com.br>
author:         Andrea Merello <andrea.merello@gmail.com>
author:         Michael Wu <flamingice@sourmilk.net>
alias:          usb:v1737p0073d*dc*dsc*dp*ic*isc*ip*in*
depends:        mac80211,eeprom_93cx6,cfg80211,usbcore
intree:         Y
vermagic:       3.14-kali1-amd64 SMP mod_unload modversions 
root@kali:~#

Identify USB Driver - modinfo driver-name showing driver file for selected USB device - blackMORE Ops - 7

USB Driver Installation

The obvious next question is how do I install USB driver? I’ve shown that in one of my previous post..

How to install Driver for TP-Link TL-WDN3200 N600 Wireless Dual Band USB Adapter in Linux

Any Linux driver can be installed similarly once you’ve identified the driver details. (or at least the files from either vendors website or a 3rd party website).

Summary

I hope this article clears up the confusion on how to detect a driver for a particular USB device.

Those who care directly to this post, I was planning to write a single article on how to identify USB and PCI driver but it seems that would be very very long post. So I’ve decided to divide the post into Two parts,

  1. Identify PCI Driver on Linux
  2. Identify USB Driver on Linux

Thanks for reading. If you’ve found this article useful, please share.

Check Also

Enabling AMD GPU for Hashcat on Kali Linux: A Quick Guide

Enabling AMD GPU for Hashcat on Kali Linux: A Quick Guide

If you’ve encountered an issue where Hashcat initially only recognizes your CPU and not the …

Boot Ubuntu Server 22.04 LTS from USB SSD on Raspberry Pi 4

Boot Ubuntu Server 22.04 LTS from USB SSD on Raspberry Pi 4

This is a guide for configuring Raspberry Pi4 to boot Ubuntu from external USB SSD …

8 comments

  1. can i disable my usb wifi ?

  2. hello
    i m using kali linux installed on virtualbox
    when i type airmon-ng in the terminal then it shows 4 things

    PHY Interface Driver Chipset

    phy1 wlan0 ath9k_htc Atheros Communications, Inc. AR9271 802.11n

  3. Fantastic guide. Thanks.

  4. How to install rtl8187 driver Plz …….

  5. Great information It has helped me out a lot. Now if you could just tell me how to get my CAT Cable to show up as /dev/ttyUSB0
    I’ve included the driver information I got from using the lshw gtk command you list. It is the CT62C Radio Cable shown here.

    2.048739] sdhci-pci 0000:07:06.3: No vmmc regulator found
    [ 2.048743] sdhci-pci 0000:07:06.3: No vqmmc regulator found
    [ 2.051637] mmc0: SDHCI controller on PCI [0000:07:06.3] using DMA
    [ 2.136076] usb 2-1: new full-speed USB device number 2 using uhci_hcd
    [ 2.331954] usb 2-1: New USB device found, idVendor=2100, idProduct=0e56
    [ 2.331966] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 2.331975] usb 2-1: Product: CT62C Radio Cable
    [ 2.331981] usb 2-1: Manufacturer: RT Systems
    [ 2.331988] usb 2-1: SerialNumber: RTYQEMH7
    [ 2.377114] [drm] initialized overlay support
    [ 2.377194] [drm] Initialized i915 1.6.0 20150522 for 0000:00:02.0 on minor 0
    [ 2.536796] fbcon: inteldrmfb (fb0) is primary device
    [ 2.548336] firewire_core 0000:07:06.1: created device fw0: GUID 00080da0d179

  6. thanks you!, i’ve been reading a lot your blog lately, and your point-by-point tutorials saved me a lot of headaches!
    keep the good work!

  7. Thank you for your helpful article! One thing I noticed about this command:

    lsusb -vv -s 148f:2870

    According to “man lsusb”, the “-s” option expects a device number (as you did in the next step) optionally preceded by a bus number. So this should have worked:

    lsusb -vv -s 2:3

    Perhaps you meant to use “-d” instead?

    lsusb -vv -d 148f:2870

  8. Really when someone doesn’t know then its up to other users that they will assist, so here it happens.

Leave your solution or comment to help others.

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

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.