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?

MiB_Coder
  • 111
  • 1
  • 4

3 Answers3

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.

techraf
  • 4,254
  • 10
  • 29
  • 41
Milliways
  • 54,718
  • 26
  • 92
  • 182
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 :)

Orphans
  • 222
  • 2
  • 9
0

You should execute ifconfig wlan0 down with delay.

For example with delay 10 seconds:

/bin/sleep 10 && ifconfig wlan0 down

deadfish
  • 101
  • 2