Using Wifi without network-manager

Mar 31

In recent Debian systems, the wireless configuration is delegated to a network-manager application by default, and the network-manager is a part of your desktop environment. It seems very comfortable for newbies, but an awful solution for an administrators who often use the console. I show you how you can manage your wifi networks using /etc/network/interfaces file.

Important: This guide is based on Debian Jessie. It may vary slightly on other Debian versions. However, the setup process should be fairly similar.

You need to install the wpasupplicant package:

apt-get install wpasupplicant

Add a wlan section to you /etc/network/interfaces file:

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
  wpa-conf /etc/wpa.conf

You can give your wifi networks parameters in /etc/wpa.conf.

network={
        ssid="MGERGIhome"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="passw0rd345"
}
network={
        ssid="MGERGIphoneshare"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="passwd678"
}
network={
        ssid="COMPANYwifi"
        scan_ssid=1
        key_mgmt=WPA-EAP
        eap=PEAP
        phase2="auth=MSCHAPV2"
        identity="mgergi"
        password="inSECUREpasswd999"
}

Next Post Previous Post