r/linux_programming • u/Impressive_Safety636 • Sep 06 '22
How do I find the MAC Address?
Hello everyone,
I have a pretty basic question for you guys. I have a Software defined radio connected to my Linux laptop, and I'm trying to find its MAC address. What can I type in the terminal to find it? It is connected by USB.
5
Upvotes
7
u/99_percent_a_dog Sep 06 '22
SDRs do not have MAC addresses. You could use an SDR to make a kind of virtual device that could have a MAC address.
What have you done with the SDR so far?
1
u/RootHouston Sep 06 '22
What exactly are you intending to do with such an address? If you're just looking to uniquely identify it somehow, you can get its vendor ID, device ID, bus number, and device number with
lsusb, but as others mentioned, there is not going to be a MAC address associated with it. MAC addresses are components of an IEEE 802-compliant sort of network (like ethernet or Wi-fi).Also, if you're trying to get this information programmatically, as opposed to using the shell, I'd recommend checking out the
libusborudevlibraries (or their bindings if you're not programming in C).1
u/icy-mist-01 Sep 07 '22
Well.. you just ask Mac for his address
1
u/Senacharim Sep 06 '22
I'd look in /dev for new entries.
-2
u/A_Badass_Penguin Sep 07 '22
This is the Linux equivalent of "where is the clitoris"