How to turn off WiFi of Raspberry Pi

There are several reasons why you might want to disable WiFi on your Raspberry Pi. One of the reasons is to reduce system usage. Although the WiFi module does not consume a lot of memory and CPU, but still uses a certain amount.

If you're not using a WiF i connection , there's really no need to turn it on on the Raspberry Pi . Thanks to the various tools, this is a fairly simple process.

The following article will show some ways to disable WiFi, from using rfkill to modifying boot configuration files.

Turn off WiFi using the Raspberry Pi desktop

This section will guide you on how to turn off WiFi connection when using the Raspberry Pi OS desktop.

The desktop interface is the easiest way to turn off WiFi as it only needs a few clicks.

1. While on the Raspberry Pi desktop, look for the WiFi icon in the top right corner of the screen. This symbol is indicated by two arrows, one up arrow and one down arrow. Click this icon to display the submenu.

Picture 1 of How to turn off WiFi of Raspberry Pi

2. When the submenu appears, all you need to do to turn off WiFi is to click on the Turn Off Wireless Lan option . Clicking this option will instantly turn off your WiFi connection.

Picture 2 of How to turn off WiFi of Raspberry Pi

3. Now, you have successfully turned off WiFi connection.

If it hasn't been disabled for some reason, be sure to read on for some more methods.

Turn off WiFi connection with rfkill

This section will show you how you can use the rfkill package to disable the WiFi of the Raspberry Pi.

This package is designed to disable wireless connections running from your device with ease. These wireless connections include both Bluetooth and WiFi.

1. Although rfkill should be included in your distribution, it's a good idea to check the signature to make sure it's installed on the system.

1. First, you need to update your package list and upgrade any existing packages.

sudo apt update sudo apt full-upgrade

2. With the update complete, you can ensure the rfkill is installed by running the following command.

sudo apt install rfkill

3. With rfkill installed, you can easily use it to turn off WiFi on your Raspberry Pi.

All you need to do is enter the following command:

sudo rfkill block wifi

You can also use rfkill to turn off your Bluetooth connection.

sudo rfkill block bluetooth

4. The WiFi connection on your Raspberry Pi is now successfully turned off.

If you want to restore functionality of your connection, you can run the following command.

sudo rfkill unblock wifi

Modify boot configuration to disable WiFi

In this section, you will learn how to modify the Raspberry Pi's boot configuration file.

By modifying this file, you can turn off WiFi connection during the boot process.

1. If you are editing this file on your Raspberry Pi, you can do so by running the following command. To edit this file I will use Nano as it is one of the easiest Terminal based editors to use. You can also edit this file when the SD card is inserted in another device. The file will be available on the partition named 'boot'.

sudo nano /boot/config.txt

2. In this section, find the following block of text. You can use the shortcut CTRL + W to search for text files when using Nano.

[all]

3. Below this text, you need to add the following line.

This line tells the system that it needs to turn off the Raspberry Pi's WiFi module.

dtoverlay=disable-wifi

You can also use this file to turn off the Bluetooth module by adding the following line.

dtoverlay=disable-bt

4. You can now save your changes to the configuration file.

If you're doing this on your Raspberry Pi, save the file by pressing CTRL + X , then pressing Y , then pressing ENTER.

5. For this change to take effect, you will need to restart your Raspberry Pi.

To safely restart your device, you can use the following command.

sudo reboot

Block WiFi with Modprobe Blacklist

Modprobe is special software used to load modules into the Linux kernel itself.

You can use a modprobe feature to block it from loading in kernel modules used for WiFi or Bluetooth connection.

1. On the Raspberry Pi, run the following command to edit the file 'raspi-blacklist.conf'. Modprobe software automatically reads in this configuration file.

sudo nano /etc/modprobe.d/raspi-blacklist.conf

2. In this file, add the following two lines at the end of the file to disable loaded WiFi kernel modules.

All this does is tell the modprobe that it cannot load in kernel modules starting with the specified name.

blacklist brcmfmac blacklist brcmutil

If you want to disable the loading of Bluetooth module, you can add the following lines.

blacklist hci_uart blacklist btbcm blacklist btintel blacklist rfcom blacklist btqca blacklist btsdio blacklist bluetooth

3. Once you've added lines of blacklist to the file, you can save the file by pressing CTRL + X , then pressing Y and ENTER.

4. For the changes to take effect, you will need to restart your Raspberry Pi. To restart your Pi, use the following command.

sudo reboot

Hopefully by the end of this tutorial, you will know how to disable WiFi on your Raspberry Pi.

Update 27 September 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile