How to connect wifi under Linux terminal?


1. If you have network line, use it than wifi, Ethernet cable or phone USB ththering.


2. "sudo su"


3. Insert wifi USB, Use "iwconfig"  to check devices.


4. "vim /etc/network/interfaces"

"""

allow-hotplug wlan0

iface wlan0 inet dhcp

wpa-ssid <wifi_name>

wpa-psk <password>

"""


5. "ifdown -v wlan0; ifup -v wlan0"