Skip to content

Instantly share code, notes, and snippets.

@Marko-M
Last active December 21, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marko-M/6335764 to your computer and use it in GitHub Desktop.
Save Marko-M/6335764 to your computer and use it in GitHub Desktop.
Debian based wireless with WPA/WPA2 from CLI
#!/bin/bash
# One time only, to create wpa.conf:
# wpa_passphrase ESSID secret > wpa.conf
# su to root, or use sudo for following commands
su
# Bring the wlan interface up
ifconfig wlan0 up
# Start wpa_supplicant. If n180211 driver doesn't
# work for you try the other ones (man wpa_supplicant)
sudo wpa_supplicant -B -Dnl80211 -iwlan0 -c./wpa.conf
# Release old lease just in case (restart dhclient)
dhclient -r
# Obtain new lease
dhclient wlan0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment