0

I want to disable the on-board wlan on my RPI3 (Raspbian) upon startup using:

ifconfig wlan0 down

It works on the command line, but when I put it in /etc/rc.local, as it was suggested here, it has no effect.

I checked that rc.local is indeed executed and wlan0 is reported as present.

Why is it not working and what would be the correct place to do it?

1

You can actually set up a cronjob to do it.

sudo crontab -e

add this:

@reboot ifconfig wlan0 down

This cronjob will run every time the system boot.

This is not the most optimal solution, but it does what it is supposed to do. It is also very easy to remove :)

  • 2
    Indeed it works. But it leaves the question open, why the operation in rc.local has no effect. – MiB_Coder Dec 11 '16 at 12:12
1

See PIXEL:

One request we have had in the past is to be able to shut off WiFi and/or Bluetooth completely, particularly on Pi 3. There are now options in the WiFi and Bluetooth menus to turn off the relevant devices. These work on the Pi 3’s onboard wireless hardware; they should also work on most external WiFi and Bluetooth dongles.

0

You should execute ifconfig wlan0 down with delay.

For example with delay 10 seconds:

/bin/sleep 10 && ifconfig wlan0 down

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.