There are several ways to disable WiFi on RPi. Solution which we’ll cover here is to disable WiFi in system configuration file config.txt. So WiFi should be disabled on system boot. This method has been tested on Raspberry Pi 4.
Open config.txt
:
$ sudo nano /boot/config.txt
Locate [all]
section. It should be near the end of the file. Append this line to it:
dtoverlay=disable-wifi
(This configuration option is documented in /boot/overlays/README
)
Reboot system.
$ sudo reboot
WiFi should be disabled. We can check this when we list all network interfaces and wlan0
is not present:
$ ip -o link show | awk -F': ' '{print $2}' lo eth0