Kudos
Collect
Twiiter
Facebook
Share
Develop somethings, meditation, reading and thinking...

[Raspberry Pi] Wifi Setting And Enable SSH with Command

Last updated 1 day ago
0 0 0 0

Wifi Setting

Search Wifi ESSIDs.

$ sudo iwlist wlan0 scan | grep ESS
    ESSID:"AirPort_what_you_want_to_connect"
    ESSID:"AirPort1"
    ESSID:"SETUP"
    ESSID:"ipTime-8888888"
    ESSID:"ipTime-9999999"
    ESSID:"Buffalo-G-1111"
    ESSID:"Buffalo-A-1111"
    ESSID:"elecom2g-22222"
    ESSID:"elecom5g-22222"
    ESSID:"iPhoneX"
    ESSID:"Guest"
    ESSID:"x00x00x00x00x00x00x00x00"
    ESSID:"W99_A9CAA99FE9EE"

If you didn’t get any of ESSID list then try to set country in wpa_supplicant.conf first by reference below. It must be country=GB but you are in out of GB.

Set ESSID / Password pair to wpa_supplicant.conf.

$ vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB # 👈 You !!!MUST!!! match with your router country frequency if you have Raspberry Pi 3 Model B+ above.

network={
        ssid="SomeWhere"
        psk="somepasswd"
        key_mgmt=WPA-PSK
}

# Add a new wifi information here.
network={
        ssid="AirPort_what_you_want_to_connect"
        psk="the_password"
        key_mgmt=WPA-PSK # 👈 If you need
}

Apply and check.

$ reboot
# alternatively,
$ wpa_cli -i wlan0 reconfigure
OK # takes about 30secs.

# After reboot
$ ifconfig wlan0 | grep inet
inet 192.168.100.99  netmask 255.255.255.0  broadcast 192.168.100.255
inet6 fe99::b699:a699:a999:f9c  prefixlen 64  scopeid 0x20<link>
# IP only disply
$ hostname -I
192.168.100.99

!!! Warning !!!

On the Raspberry Pi 3 Model B+, you will also need to set the country code, so that the 5G networking can choose the correct frequency bands.
from Setting WiFi up via the command line

Which means that you have to match country code with your router country frequency in your home from country=GB on Raspberry Pi 3 Model B+.

Enable SSH

raspi-config can be used in the terminal:

Enter sudo raspi-config in a terminal window
Select Interfacing Options
Navigate to and select SSH
Choose Yes
Select Ok
Choose Finish

Alternatively, use systemctl to start the service

$ sudo systemctl enable ssh
$ sudo systemctl start ssh

from SSH (Secure Shell)

References

Hi, my name is Richard. I’m a developer wants to make the world better with logic power. Mainly I use Linux, Nginx, MySQL, PHP and JavaScript . I want to share my knowledge with someone that it was also based from some great persons via LYNMP. 👨‍💻

Related Articles
 

Responses

Leave a response to @richard

Please sign in to comment.
Markdown is also available in comment.