to initialize the interface: sudo ifconfig <interface name like wlan0> up
to connect to wireless: sudo iwconfig <interface name> essid <network name like Stanford>
to obtain an ipaddress: sudo dhclient <interface name>
to test whether connection is valid: ping -c 1 www.google.com