Use the Iwconfig command:
Search Wireless network iwlist wlan0 Scan
Write down Essid.
Connect a wireless network without a password iwconfig wlan0 Essid chinanet where chinanet is the search for a wireless network Essid
Connect a password to the wireless network Iwconfig wlan0 Essid chinanet key xxxx where xxxx is the password
Enable wireless card ifconfig wlan0 up
Get IP dhclient wlan0 or dhcpcd wlan0 via DHCP?
$vi/etc/network/interfaces Add the following:
Auto Wlan0
Iface Wlan0 inet DHCP
pre-up IP link Set wlan0 up
Pre-up iwconfig wlan0 Essid your-ssid-here
Wpa-ssid Your-ssid-here
WPA-PSK Your-passwd-here
Finally restart the network $/etc/init.d/networking restart
Or
Auto loiface lo inet loopback #allow-hotplug eth0#iface eth0 inet dhcp #auto eth0#iface eth0 inet static#address 192.1 68.101.50#netmask 255.255.255.0#gateway 192.168.101.1#broadcast 192.168.101.255
#auto Wlan0
#iface Wlan0 inet DHCP
#wpa-ssid Your-network-name
#wpa-key-mgmt WPA-PSK
#wpa-group TKIP CCMP
#wpa-PSK Your-network-key
From for notes (Wiz)
Linux WiFi configuration