Ubuntu wireless configuration from command line

Generate passphrase:

wpa_passphrase <myssid> <mypassword> > /etc/wpa_supplicant.conf

Edit /etc/network/interfaces:

auto <wireless-interface>
iface <wireless-interface> inet static
  wireless-essid <myssid>
  post-up wpa_supplicant wpa_supplicant -B -Dnl80211 -i<wireless-interface> -c/etc/wpa_supplicant.conf
  post-down killall -q wpa_supplicant

Here you need to find out your wifi adapter’s driver using wpa_supplicant –help. In my case it is nl80211 but yours may be different.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s