system_profiler SPUSBDataType | grep "Serial Number" -B5 If a USB Device has a serial number it will be shown in the output.Īs mentioned by Allan in his comment, you can use the following command to minimize the output to include relevant portions of the device information that contain the device name and serial number with a bit of additional info. However, if you want to output information about USB Devices that are enumerated by the OS, in Terminal, then use the following command: system_profiler SPUSBDataType In macOS, it does not have such a script as it doesn't store the information in the same manner. In Linux, usb-devices is a bash script that essentially reads a bunch of text files, symlinked to /sys/bus/usb/devices/usb*, that contain information about the USB Devices and formats it in the output you see under Linux. Information about USB Devices is stored differently under Linux then macOS:
0 Comments
Leave a Reply. |