#!/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