How to disable Wi-Fi on Raspberry Pi? (7 ways, Lite/Desktop)

In a recent tutorial, I showed you how to use Wi-Fi on your Raspberry Pi (with 5 different solutions)
Here, I will show you the opposite 🙂
That’s to say, how to disable your Wi-Fi adapter to use only the Ethernet cable

How to disable Wi-Fi on Raspberry Pi?
Wi-Fi is not necessary when you always use your Raspberry Pi connected with an Ethernet cable
The easiest way is to turn it off manually with sudo ifconfig wlan0 down
But it’s not permanent, and there are many other solutions to do this

In this post, I will show you 7 ways to disable your Wi-Fi forever (until you reverse your changes)
Most of them will work on any operating system, but I only tested on Raspbian

By the way, if you are really interested in improving your skills on Raspberry Pi, I highly recommend to check out my e-book here. It’s a 30-days challenge from beginner to master, with step-by-step tutorials and many projects to practice along the way.

1 : Crontab

As I already showed you half of the first solution, I will start with this one
In introduction, I gave you one command to disable temporarily your Wi-Fi interface

Here is one way to disable it automatically at each reboot:

  • If you are on Raspbian Desktop, start by opening a terminal
    (or jump to the next solution, easier for you)
  • Then open the crontab in edit mode:
    sudo crontab -e
    Crontab is something like a tool to configure scheduled tasks, you can learn more here about Linux crons
    When you use sudo crontab instead of crontab, you are scheduling the tasks for the root user
  • If it’s the first time you do this, select your favorite text editor
    Press enter to stay with nano
  • In the crontab file, add the following line at the end:
    @reboot ifconfig wlan0 down
  • Save and exit (CTRL+O and CTRL+X with nano)

Your Wi-Fi adapter will now stop directly at each boot, so you are sure to use the Ethernet cable all the time
To bring the Wi-Fi up again (temporarily), use:
sudo ifconfig wlan0 up
Or remove the line in the crontab to enable it at each boot

2 : Raspbian Desktop

Most of my solutions here are for Raspbian Lite
If you are on Raspbian Desktop, there is an easy way to disable the Wi-Fi adapter:

  • On the right top bar (near the clock), find the Wi-Fi icon
  • Click on it (left click)
  • A menu like this shows up:
  • Click on “Turn Off WiFi” to disable it

You need to do this after each reboot, but it’s as easy as this
I didn’t find any permanent way on Raspbian Desktop

3 : Raspi blacklist

The third way to disable Wi-Fi on your Raspberry Pi is more extreme
On Debian, as on many other distributions, modprobe is a program that load kernel modules on boot
You can choose to disable some modules, like the Wi-Fi drivers for your Raspberry Pi:

  • In a terminal, open the following file:
    sudo nano /etc/modprobe.d/raspi-blacklist.conf
  • Paste these two lines in it (the file is probably empty):
    blacklist brcmfmac
    blacklist brcmutil
  • Save and exit (CTRL+O, CTRL+X)

Then reboot your Raspberry Pi (with an Ethernet cable plugged), and you will not see the Wi-Fi adapter on the next boot
Remove the two lines from the file to reactivate it

4 : Config.txt

Another method you can try, is to edit the Raspbian configuration file
The good news is that you can even do this on a fresh Raspbian SD card, to disable the Wi-Fi directly

Here is how to do this:

  • You can open a terminal, connect via SSH, or edit the file directly on the SD card from your computer
  • Open the config.txt file with nano:
    sudo nano /boot/config.txt
  • Find the following line:
    # Additional overlays and parameters are documented /boot/overlays/README
  • And add these two lines under it:

    The second line is for the Bluetooth module
  • Save and exit (CTRL+O, CTRL+X)
  • Reboot your Raspberry Pi to check if everything work as expected

Note: on older Raspbian versions, you need to add pi3 at the beginning, like this:

5 : Modprobe

This one is almost the same as the blacklist solution, but it’s a temporary one
You can use modprobe as a command instead of editing the configuration file

Here is the command (use this in a terminal if you are on Raspbian Desktop):
sudo modprobe -rv brcmfmac
This command will also remove brcmutil and cfg80211 automatically

To bring back the Wi-Fi adapter, use this one:
sudo modprobe brcmfmac

If the first solution didn’t work for you, you can also use this command in a crontab to do it automatically on boot

6 : RFKill

RFKill is command line tool to query, enable or disable radio transmitters on a system
That’s exactly what we want to do, so we can use RFKill to disable our Wi-Fi adapter
RFKill is available directly on any Raspbian version

Here is how to do this:

  • Open a terminal and enter the following commands:
    sudo rfkill block wifi
    sudo rfkill block bluetooth
  • This should disable your Wi-Fi and Bluetooth cards directly

The block command is persistent after a reboot
To enable Wi-Fi or Bluetooth, use the unblock command like this:
sudo rfkill unblock wifi
sudo rfkill unblock bluetooth

7 : Systemctl

Finally, the last solution I want to show you, is to use systemctl to stop the wireless services
Systemd is the service manager on many Linux distributions, and you can use systemctl to see and control each service state

Here are the three commands to do to disable all services:
systemctl disable wpa_supplicant
systemctl disable bluetooth
systemctl disable hciuart

Then reboot your Pi to apply the changes
Use the “enable” command to use the Wi-Fi again

Note: This is not working on my Pi 4 with Raspbian Buster, but I have seen these commands many times, and I’m sure to have used them in the past, so it’s probably working on Stretch or other Raspberry Pi models
I give it to you as a last chance if everything else is not working for you 🙂

Tips to improve your network speed

One of the reasons you might be reading this tutorial, is if you have network issues, like disconnections or low speed.
Here are a few other things you can try to solve this:

  • Use a Raspberry Pi 4 : The previous Raspberry Pi models didn’t include a gigabit Ethernet port (even the Raspberry Pi 3B+ is limited to 300MB max). By using a recent model, you can really improve your network speed for projects where it’s essential.
  • Use a better switch : If you have an old router that provides the Internet connection, it may not be the best solution for a fast network between your computer and your Raspberry Pi. Adding a faster switch, with 1GB Ethernet ports on it will improve your transfer rates.
  • Replace the Ethernet cables : Maybe not the more efficient solution, but definitely the cheapest one. I’m using the same Ethernet cables for years, but new ones are better and better, and if you have a 20 years old cable that you replace by a new one, it may be enough to improve the network speed (and solve most of the disconnections by the way).


6 Ways to Disable Wi-Fi on Raspberry Pi


That’s it! I think we have seen most of the solutions available
I hope you found one that works for you, and that this post was helpful

If you have any other idea to do the same thing, feel free to leave a comment below

This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Patrick Fromaget

I'm the lead author and owner of My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

10 thoughts on “How to disable Wi-Fi on Raspberry Pi? (7 ways, Lite/Desktop)

  1. I went with “4 : Config.txt”. It worked like a charm.

    I’m running a headless piHole installation and was looking to conserve RAM by disabling wireless radios and sound. I recovered 32MB of RAM after disabling WIFI, BT, and the bcm2835 sound chip. Here’s a snippet of by /boot/config.txt:

    # Additional overlays and parameters are documented /boot/overlays/README

    # Enable audio (loads snd_bcm2835)


    Version: Pi 4 model B, 4GB
    PiHole 5.0

  2. Hi, thanks for the guide! I tried the crontab in my Rpi4 and it didn’t work (subsequently tried the “sudo ifconfig wlan0 down” manually and it did work). After that I tried modifying the config.txt and that did work. I had a question though, when one disables the WiFi in the GUI what command is run? I ask because someday in the future I may stop using my Pi for a few years, then one day plug it back in with the GUI (I’m not using the GUI now) and scratch my head at why the WiFi isn’t working. So if I had to choose a method, I would choose whichever is the one that the GUI also uses, so that it could be undone by the GUI.

  3. Thank you for this. I went with the config.txt approach so that if I need to enable it again without an ethernet connection, I can pull the card and edit the file.

    systemctl disable was not working over a reboot on my Pi 4 Raspbian Buster either.

  4. Thanks for the guide.

    Use my Pi as a light server and everything that is not necessary should be removed. In DietPi there is a way of removing/purging software for wifi and I miss that in you guide.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

Master your Raspberry Pi - 10% off