Raspbian WiFi Setting

Connect to Home WiFi:

WPA/WPA2 (no id required): /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
wpa-ssid <ssid>
wpa-psk <psd>

WEP

auto wlan 0
iface wlan0 inet dhcp
wireless-essid <ssid>
wireless-key <psd>

connet to Enterprise wifi:

Note, you have to has the certificate for the network. Better to ask one from your network admin if you don't have it already. For some organisation, they might share a certificat.

Go to /etc/network/interface, input

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

then go to /etc/wpasupplicant/wpasupplicant.conf, input

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update config=1

network={
  ssid: "***" //WiFi name
  proto=RSN
  key_mgmt=WPA-EAP
  pairwise: CCMP
  auth_alg=OPEN
  eap=PEAP
  identity="*******" //user name
  password="*******"
  ca_cert="/home/pi/UTN-DATACorpSGC.crt" //certificate
  phase2="auth=MSCHAPV2"
}

Restart Network

At last, you can use blow cammands to restart the network.

sudo /etc/init.d/networking restart
sudo ifdown wlan0
sudo ifup --force wlan0

If they don't work, just restart the Pi.