Raspberry Pi

How to Disable WiFi on Raspberry Pi When Ethernet Connected

Raspberry Pi is a mini computer that has the power to become your personal computer since it has a built-in CPU processor that can run different Linux based operating systems. The device needs an SD card to run an operating system on it and has a built-in WiFi module and Ethernet port for internet connectivity. Most Raspberry Pi users connect the device to the internet through Ethernet cable for high-speed internet connection. Thus, disabling the WiFi is beneficial to save power consumption.

This article is a detailed guideline to show you the methods to disable WiFi on Raspberry Pi when Ethernet is connected.

How to Disable WiFi when Ethernet Connected – Raspberry Pi

Disabling WiFi on Raspberry Pi is simple and it can be done via:

  • GUI
  • Terminal

Method 1: Disable WiFi from GUI

The Raspberry Pi users can easily disable the WiFi directly from the “WiFi” option on the task panel.

The users have to click on the “Wifi” option and select the “Turn Off Wireless LAN” option to disable the WiFi on Raspberry Pi.

Method 2: Disable WiFi from Terminal

For those users who wants to use terminal to disable the WiFi on Raspberry Pi, they can do it from:

  • Boot Configuration File
  • ifconfig Command
  • rfkill Command

1: Disable WiFi from Boot Configuration File

The Raspberry Pi boot configuration file allows users to do configuration inside the system. To disable WiFi through Boot configuration file, follow the below-given steps:

Step 1: Open the boot configuration file through the nano editor.

$ sudo nano /boot/config.txt

Step 2: Then add the following line inside the boot configuration file.

dtoverlay=disable-wifi

Step 3: Save the file and then reboot the device to successfully disable the WiFi on Raspberry Pi.

Note: You can enable the WiFi anytime by opening the boot configuration file and commenting the “dtoverlay” line by adding # before it.

2: Disable WiFi from ifconfig Command

The ifconfig command is used for performing network related tasks. It also allows users to enable and disable network interfaces on your system.

To disable the WiFi on Raspberry Pi, the users can follow the below-given command:

$ sudo ifconfig wlan0 down

Note: You can use the ifconfig command to find the WiFi interface name.

You can enable the WiFi anytime by executing the following command:

$ sudo ifconfig wlan0 up

3: Disable WiFi through rfkill Command

The rfkill is a command-line tool that allows users to manage network interfaces on the system. Through rfkill command, the users can disable the WiFi on Raspberry Pi. For this purpose, go with below-given command to disable WiFi:

$ sudo rfkill block wifi

To enable the WiFi again, just hit the below-given command:

$ sudo rfkill unblock wifi

Conclusion

While using the Ethernet cable to connect the Raspberry Pi device to the Internet, you can easily disable WiFi on the system through GUI and terminal. The GUI method is straightforward, while for Terminal, you can go with the boot configuration file or using ifconfig and rfkill command to disable the WiFi on Raspberry Pi.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.