Skip to content

Instantly share code, notes, and snippets.

@linnil1
Last active July 16, 2017 16:24
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 linnil1/ae7ee4fd64d6b2d0f3552ff544df0685 to your computer and use it in GitHub Desktop.
Save linnil1/ae7ee4fd64d6b2d0f3552ff544df0685 to your computer and use it in GitHub Desktop.
# scan wifi
sudo iwlist wlan0 scan
# modify file to auto connect to wifi
sudo vim /etc/network/interfaces
# change wlan0 like this
auto lo
iface lo inet loopback
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# and change another file
:tabnew /etc/wpa_supplicant/wpa_supplicant.conf
# add this to bottom of file
network={
ssid="name"
psk="password"
priority=1
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
}
network={
ssid="name"
psk="password"
priority=2
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
}
# close
#check if config file is valid
sudo ifdown wlan0
sudo ifup wlan0
# check ip
ifconfig wlan0
curl ipinfo.io/ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment