I'm remoting into a RPi Zero W using SSH. The RPi is connected to the internet via Ethernet cable. I want to set-up the WiFi at the current remote location and check that it will work when the Ethernet cable is disconnected.

I can set-up the WiFi via raspi-config or by directly editing the wpa_supplicant file. Is there a way to verify remotely that the WiFi will work once the Ethernet cable is unplugged?

If I run iwgetid I get nothing back, ostensibly because the wireless LAN is not currently being used. The command iwconfig gives me:

lo     no wireless extensions.
eth0   no wireless extensions.
wlan0  IEEE 802.11 ESSID:off/any
       Mode:Managed Access Point: Not-Associated
       Retry short limit:7 RTS thr:off Fragment thr:off
       Power Management:on

If I run sudo iwlist wlan0 scan I can see the network I want to connect to. Is there any way to test it while plugged into Ethernet?

OS is Raspbian installed via NOOBS v. 2.8.1. I did verify the RPi can connect to the internet over WiFi at my location before shipping it off to the current remote location.

  • you can use ping with a specific interface while still connected via ethernet so if it does not work you still maintain connectivity. Jan 17, 2019 at 0:52
  • I'm unsure what you want to setup. You have a wired ethernet connection to your router and want a second connection with wifi to it that will be used without reboot if the wired connection is disconnected. Is it this what you want?
    – Ingo
    Jan 17, 2019 at 11:15
  • Or should there run an access point on the RasPi? Then you have already given the answer. Executing sudo iwlist wlan0 scan on another device with wifi shows you the access point if running. For my understanding it doesn't matter if the ethernet cable is plugged in or not.
    – Ingo
    Jan 17, 2019 at 11:46

1 Answer 1


If you setup /etc/network/interfaces as in How to set up networking/WiFi then you can see if it has connected (and the IP) with ip a.

route -vn will show if there is an entry in the routing table (and the metric). Both eth0 and wlan0 should have entries.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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