Deactivate WiFi of Raspberry Pi

This how to helps you to learn how to permanently Deactivate WiFi of Raspberry Pi. This can be done by a simple edit of the right file. 

Deactivate WiFi of Raspberry Pi

Index Of How To Deactivate WiFi of Raspberry Pi

Background

Whilst I do not know why you like to permanently deactivate the WiFi on Raspberry Pi, there are 5 reasons that come to mind that could make you think to turn WiFi off:

  • Power Conservation: Wi-Fi consumes additional power, which can be a concern in battery-powered or energy-efficient projects. By disabling Wi-Fi, you save energy and extend your Raspberry Pi’s battery life.
  • Security Considerations: In security-sensitive projects or environments where Wi-Fi connectivity poses a potential risk, disabling Wi-Fi minimizes attack vectors. Air-gapped systems or projects with strict security requirements benefit from this approach.
  • Streamlined Network Setup: If your Raspberry Pi is always connected via Ethernet, Wi-Fi becomes unnecessary. Disabling it simplifies your network configuration and ensures consistent connectivity through the wired connection.
  • Resource Optimization: Although the Wi-Fi module doesn’t consume significant memory or CPU time, it still uses system resources. If you’re not actively using Wi-Fi, disabling it frees up these resources for other tasks.
  • Avoiding Interference: In scenarios where Wi-Fi interference affects performance (such as crowded environments or overlapping networks), disabling Wi-Fi ensures a stable and interference-free connection via Ethernet.

Permanently Deactivate WiFi of Raspberry Pi

  1. Login into your Raspberry Pi by leveraging SSH. Once done, fire the below command:
    vi /boot/config.txt

    Within this file, add at the end into the section of [all] the below line:
    dtoverlay=disable-wifi
    
  2. Reboot the system by
    sudo reboot
  3. Check if it worked by entering:
    ifconfig -a

    You should find now now wifi anymore. The wifi interface is typically called “wlan0″ or similar. Instead it should look like the below:
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.XXX.XXX  netmask 255.255.255.0  broadcast 192.168.XXX.XXX
            inet6 fe80::XXXX:XXXX:XXXX:XXXX  prefixlen 64  scopeid 0x20<link>
            ether b8:27:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
            RX packets 125  bytes 20904 (20.4 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 73  bytes 12890 (12.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 10  bytes 1618 (1.5 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 10  bytes 1618 (1.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Additional Information

To also deactivate Bluetooth, do exactly the same like in the above, but add additionally in /boot/config.txt the following line at the end:

dtoverlay=disable-bt

Follow me

It would be amazing if you follow my myhowto.blog. To my blog is actually easy! You can leverage on

  • Click to follow me on Twitter
  • Bookmark this page and comeback from time to time

Help and Comments

I am really looking forward for you to contact me if for example you found a better option or other idea then in this how to. Also, please touch base if you found an error or anything not working or if you have something that you would love to be added to the myhowto.blog. Simply click this link to touch base with me.

Linking Or Recommending The How To Or The myhowto.blog

I would love to see you are recommending this how to or link it to your website. Also, I would love if you link or recommend the whole myhowto.blog. Please feel free to do so! In case you like to touch base regarding this topic with me, then simply click this link. I look forward!