How to connect wireless (static ip) via CLI Ubuntu

set your wifi and password. open  ”/etc/network/interfaces” and add this:

…..

auto wlan0

iface wlan0 inet static

address 192.168.1.xx

netmask 255.255.255.0

gateway 192.168.1.1

dns-nameservers 8.8.8.8

wpa-ssid yourWirelessName

wpa-psk yourWirelessPasswd

then type in your lovely terminal ( ctrl+alt+T )

  1. #ifconfig wlan0 up
  2. #iwlist wlan0 scan
  3. #iwconfig wlan0 essid YourESSIDName
  4. #dhclient wlan0
Advertisements