0

I have a rpi3 connected to an ethernet cable and via wireless to a router. I believe it may be the cause of terrible connectivity while ssh'ing into my pi3 since it lags horrible on some days, not others etc.

How do I temporarily disable the wifi connection from the terminal in order to determine if its a conflict between both adapters being active at the same time or not?

  • 1
    Could you explain why you need two connections to the same network in the first place? – Dmitry Grigoryev Aug 15 '18 at 7:56
4

To turn WiFi off:

sudo rfkill block wifi

To turn WiFi back on:

sudo rfkill unblock wifi

To check the status of your wireless communication interfaces:

sudo rfkill list all
| improve this answer | |
1

If you aren't worried about actually powering off the WiFi radio, you can probably just bring the WiFi's network interface down - "sudo ifconfig wlan0 down"

| improve this answer | |
  • 1
    Before you do "sudo ifconfig wlan0 down", do me a favor and do "sudo ifconfig wlan0 up" and let me know the result. Please. " – Jan Hus Aug 15 '18 at 3:22
1

Or if you want to disable WiFi at boot, in your /boot/ (or /boot/firmware/ ) "config.txt" file add or uncomment the line "dtoverlay=pi3-disable-wifi" Note that this may be simply "dtoverlay=disable-wifi" in newer configurations.

To reenable wifi, comment out the line with a leading hash (octothorpe) symbol. (a "#")

[ I use 'mcedit' as my preferred editor. Others may use vi, ed, vim, nano, or etc... For guidance on how to edit system configuration files: See other documents. Or RTFM. ]

| improve this answer | |
  • Why not simply use rfkill block all? No reboot needed. – Dougie Feb 20 at 12:11
  • @Dougie Because some of us are neat-nicks. No WiFi means you can remove all the WiFi associated packages. Like 'rfkill' as it's no longer needed. – dave58 Feb 21 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.