1

This is a question, but also kind of thinking out loud. I hope I'm not the only one whose curiosity is piqued by this and wants the answer:

Situation:

I was using VNC to access my Raspbian Pi (static IP) and accidentally clicked the Wifi icon up top, then clicked Turn off Wifi (or whatever it's actually named). Obviously my VNC lost connection.

So I plugged in a keyboard and tried turning it back on through the terminal locally:
sudo ifconfig wlan0 up (didn't work)
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf (adjustments found online didn't work)
sudo nano /etc/networks/interfaces (adjustments found online didn't work here either)
sudo raspi-config (re-entering wifi settings here didn't work)

Then I figured (took my brain long enough) that since I turned it off with the mouse, maybe try turning it back on with the mouse. Worked (after a reboot).

Question:

What's the difference? And how could I have used terminal to properly turn it back on? I'm under the impression that anything can be accomplished via the terminal. Is that true?

Thanks in advance

P.S. Side note, if anyone has experience running a wordpress server on a pi or any machine really, I could use some real help on my other question here. All insights are very much appreciated!
https://wordpress.stackexchange.com/questions/291690/cant-upload-media-to-my-raspberry-pi-wordpress-server

  • Did you try ifup wlan0 ? – Radu Jan 21 '18 at 23:47
  • From my short online research, I read that that command was replaced, presumably by ifconfig wlan0 up. I just ran it to see, and it says: ifup: unknown interface wlan0 (reminder: my setup works now, this is just for educational purposes) – Sean C. Li Jan 21 '18 at 23:50
  • if you do an ifconfig, what interfaces show? – Radu Jan 21 '18 at 23:52
  • At the time, wlan0 didn't show up. Just eth0, lo, and tun0. Then I would try sudo ifconfig wlan0 up and it would say that it can't do that...something referring to "RF-kill" (?) – Sean C. Li Jan 21 '18 at 23:54
0

The following commands turns on WIFI for me:

rfkill unblock 0

here 0 refers to the device type id

sudo rfkill list all


0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

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.