「Linux」- 通过「网卡别名wlanX」查找对应的「无线USB网卡」

  CREATED BY JENKINSBOT

# find /sys/devices -name wlxc83a35c802f2
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/net/wlxc83a35c802f2

# cat ‘/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/uevent
DEVTYPE=usb_interface
DRIVER=rt2800usb
PRODUCT=148f/5370/101
TYPE=0/0/0
INTERFACE=255/255/255
MODALIAS=usb:v148Fp5370d0101dc00dsc00dp00icFFiscFFipFFin00

# lsusb -d ‘148f:5370
Bus 002 Device 003: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

通过「无线USB网卡」查找对应的「网卡别名wlanX」