Here’s a quick way to get connected to your wireless network. Note, your router will have to have dhcp enabled. This won’t work for other networks — you’ll need a network manager for that.
Login as su and edit
At the end of the file, add this
auto wlan0 iface wlan0 inet dhcp wpa-ssid the_ssid_name_of_your_network wpa-psk your_network_password
As this file now contains your network password, make sure only root can access it.
chmod 600 /etc/network/interfaces
Reboot for changes to take effect.