List all available USB-ports Linux [closed]

i'm trying to find a way to list NOT plugged devices, but all available usb ports by hardware. I'm working with RPi and it has 4 usb ports , determine by numbers: 1.1.2, 1.3, 1.1.3, 1.2. But i can access this information only when device is plugged. Is there a way to get this numbers not plugging device. Thanks!

3

1 Answer

USB port information (free or occupied) can be shown by:

$ sudo lshw | grep -i -B5 -A3 'logical name: usb'

or

$ sudo lshw | grep -i -B4 -A3 'usb@'

Which shows output including (not taken on an RPi):
bus info: usb@3
bus info: usb@4
bus info: usb@4:1
bus info: usb@1
bus info: usb@1:1
bus info: usb@1:1.2
bus info: usb@1:1.4
bus info: usb@2
bus info: usb@2:1
bus info: usb@2:1.5

3

You Might Also Like