If you are using your Raspberry Pi and you don’t need to use the Wi-Fi and Bluetooth like for example if you use it as a desktop or a server, it is recommended to disable it.
Note this disable the interfaces at the hardware level, not software, so it is disabled until you remove the config and reboot the Raspberry Pi.
# For Ubuntu 22.04, and any other distro that doesn’t have usercfg.txt:
- Open the config.txt file located on the boot partition. (
/boot/firmware/config.txt
inside Raspberry Pi orD:\config.txt
(drive letter might be different) in Windows.) - Add
dtoverlay=disable-wifi
below the bottommost[all]
to disable Wi-Fi. - Add
dtoverlay=disable-bt
below the bottommost[all]
to disable Bluetooth. - Save and reboot your Raspberry Pi.
# For Ubuntu 20.04, and any other distro that have usercfg.txt:
- Open the usercfg.txt file located on the boot partition. (
/boot/firmware/usercfg.txt
inside Raspberry Pi orD:\usercfg.txt
(drive letter might be different) in Windows.) - Add
dtoverlay=disable-wifi
to disable Wi-Fi. - Add
dtoverlay=disable-bt
to disable Bluetooth. - Save and reboot your Raspberry Pi.
# For Raspberry Pi OS (formerly Raspbian):
- Open the config.txt file located on the boot partition. (
/boot/config.txt
inside Raspberry Pi orD:\config.txt
(drive letter might be different) in Windows.) - Add
dtoverlay=disable-wifi
under[all]
to disable Wi-Fi. - Add
dtoverlay=disable-bt
under[all]
to disable Bluetooth. - Save and reboot your Raspberry Pi.
To enable it again just remove dtoverlay=disable-wifi
& dtoverlay=disable-bt
in your configuration and reboot.
Tested on Raspberry Pi 4 Model B.