Skip to content

Instantly share code, notes, and snippets.

@dragolabs
Last active March 22, 2018 17:15
Show Gist options
  • Select an option

  • Save dragolabs/c56a33fc9a8ebb5bfa32 to your computer and use it in GitHub Desktop.

Select an option

Save dragolabs/c56a33fc9a8ebb5bfa32 to your computer and use it in GitHub Desktop.
ubuntu server connect to wifi

/etc/network/interfaces

auto wlan0
iface wlan0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid <your_router>
wpa-psk <your_wpa_key>
dns-nameservers 8.8.8.8 192.168.1.1

Be sure to select a static address outside the range used by the DHCP server in the router, switch or other access point. Of course, substitute your details here.

Get the system to read and use the changes:

sudo ifdown wlan0 && sudo ifup -v wlan0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment