How to get the list of USB devices without GUI and kernel module on Linux?

When the embedded system based on Linux is used, it may be useful to find out how to get the list of USB devices, if the GUI is not available. It can be done not just with the help of our command line utility, but with the built-in features of the system as well.

One will need to run the following command in the terminal:

for device in $(ls /sys/bus/usb/devices/*/product); do echo $device;cat $device;done

The output will look as follows:

USB-PS/2 Optical Mouse
EHCI Host Controller

The first line contains the address of the device (the hub port). For the mouse in the example it is 2-5.1.

The second line represents the name of the USB device.

To share a USB device (a USB mouse in this example), the following command should be executed in the console utility:

eveusbc share 1045 2-5.1