Skip to content

Instantly share code, notes, and snippets.

@nathanqthai
Created May 22, 2019 18:29
Show Gist options
  • Save nathanqthai/12392d8344c6f2050472c95e5edff07d to your computer and use it in GitHub Desktop.
Save nathanqthai/12392d8344c6f2050472c95e5edff07d to your computer and use it in GitHub Desktop.
connect to wifi
#!/bin/sh
INTERFACE='wlp5s0'
[ "`whoami`" = root ] || exec sudo "$0" "$@"
wpa_supplicant -B -i ${INTERFACE} -c /etc/wpa_supplicant.conf -D nl80211,wext
dhclient -r ${INTERFACE}
dhclient ${INTERFACE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment