[ubuntu 16.04 mate] how to set mac adress of wlan0?


I just noticed that wlan0 got random mac adress after a reboot, I tried to set it with:

ip link set wlan0 address XX:XX:XX:XX:XX:XX

but I got:

RTNETLINK answers: Operation not supported

I also tried to solve this problem by creating /etc/udev/rules.d/75-static-mac:

ACTION=="add", SUBSYSTEM=="net", ATTR{dev_id}=="0x0", KERNEL=="wlan0", NAME="wlan0", RUN+="ip link set wlan0 address 00:08:22:4a:ba:fb"

but don’t work either. I never really have to deal with udev, so I don’t know if it could work but I mess with something, or if for some reason using udev won’t work…

the problem with random mac adress is the ip adress is never the same between two reboots.