When I stick in a usb wifi dongle, my computer says "usb router detected" and then I can connect to an existing network or create my own and share internet over it. I know I can share internet over wifi with a command line, but how do I detect when the usb device is plugged in? It must have some unique identifier.
I'm using a D-Link DWA-131 usb wifi adapter.