Created
May 3, 2014 22:43
-
-
Save KsaRedFx/2d92b7956dd5c23fc6e2 to your computer and use it in GitHub Desktop.
Enabling Wireless from CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iface=wlan0 | |
ifconfig -a | |
echo "Read the above text and input the name of the device you think is your wireless card (usually wlan0) " | |
read iface | |
ifconfig $iface down | |
ifconfig $iface up | |
iwlist $iface scan | grep -i ESSID | |
echo "Read the above text and input the name of the network you wish to connect to" | |
read router | |
echo "Please input the password for the network selected" | |
read passphrase | |
killall wpa_supplicant | |
wpa_passphrase $router $passphrase > /etc/wireless-wpa.conf | |
wpa_supplicant -B -Dwext -i$iface -c/etc/wireless-wpa.conf | |
dhclient -r | |
dhclient $iface |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment