WPA Protected wifi and Arch Linux Arm.

Wifi isn’t that simple on Linux. Well, it is to some extent using NetworkManager under graphical environment. But in a terminal, setting up a wifi can be cumbersome. Fortunately, systemd and ArchLinux ARM has made this process a breeze through many examples sitting in /etc/network.d/examples. That being said, there’s some things that may not be clear for people using systemd for the first time so here’s how to make your wifi work.

Enabling Wifi

Lucky us, Arch already made some of the work for us. Edit /etc/network.d/wireless-wpa and change the ESSID for the name of your router and the key to your WPA password.

Once done, you will be able to activate that configuration by typing (in root)

# systemctl enable "netfcg@wireless-wpa.service"
# systemctl start "netcfg@wireless-wpa"

Now your wifi should work.

There’s some magic here and it might be good to explain what’s happening with netcfg@wireless-wpa.service:

In /usr/lib/systemd/system, there’s a file name netcfg@.service. This file is a wrapper. So when you call systemctl enable “netcfg@wireless-wpa.service” netcfg@.service is called and in return will use /etc/network.d/whatever_is_after_@.

Disabling Ethernet

So once your wifi works, it’s a good idea to disable your ethernet. If you don’t it won’t change much except that every time you boot you will have an error message from systemd saying netcfg@ethernet-eth0.service failed. False negative is more than useless: it makes any other important error message less important because you will be used to seeing error at boot time.

To get rid of ethernet service we do the opposite of enabling the wifi. In /etc/network.d/ there is a file name ethernet-eth0. So doing the exact opposite:

# systemctl disable "netcfg@ethernet-eth0.service"
# systemcdl stop "netcfg@ethernet-eth0"

The last line is only useful if ethernet was connected. Voilà!

If you reboot, you won’t see an error about ethernet and you will see a message saying that your wifi was successfully connected to your home network.

Get more ideas like this to your inbox

You will never receive spam, ever.