A
A
akdes2017-07-25 18:39:28
linux
akdes, 2017-07-25 18:39:28

Node-getmac pulls mac-Address only from eth0, what should I do?

Hello.
I wrote a program on electron that needs a mac address, I get the address through running it on Linux -
var macAddr = require('node-getmac');

cat: /sys/class/net/eth0/address: No such file or directory

checked the path: instead of eth0 in my case enx 123abc7567.
The option to change to eth0 will not work, because I have a large pool of Linux machines and I don’t really want to spend a week with renaming :(
Google is silent, I see I’m still “alone” with this problem.
Any ideas what to do?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
akdes, 2017-07-25
@akdes

ok, I thought they all work the same, but no. works via ip link - should work

S
SagePtr, 2017-07-25
@SagePtr

Is it not an option to directly read the /sys/class/net/ enx123abc7567 /address file?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question