in etc/wpa-supplicant.conf
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
or for Raspberry Pi OS, Raspbian Stretch, or Raspbian Buster:
country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev # Include this line for Stretch
network={
ssid="YOUR_NETWORK_NAME"
key_mgmt=NONE
}
Use- sudo iwlist wlan0 scan -to scan for wireless SSID cmd line
Use- sudo ifup wlan0 -to start wireless
iwgetid -will give you the SSID
iwconfig -will show you wireless card