What is the terminal command behind right clicking on the wireless icon (Ubuntu 15.04) and then unchecking "Enable Wi-Fi" the box?

Why am I asking it?

macchanger just work for me when I disable my wifi via GUI, call sudo macchanger -e wlan0 and enable the wifi via GUI again.

When I try using the command lines below, although I get no error, at the end my MAC address remains the same:

  • sudo ifconfig wlan0 down
  • sudo macchanger -e wlan0
  • sudo ifconfig wlan0 up

Same applies when I try with:

  • sudo ip link set dev wlan0 down
  • ...

If you're using NetworkManager (and you very likely are): nmcli radio wifi off. This is simply a command line interface equivalent of the widget. NetworkManager is a complicated beast. I'm not sure what the basic commands are that it's using.

  • works perfectly. very appreciated – user101903 Jul 26 '15 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy