Using Arch Linux on a Raspberry Pi and a USB Wi-Fi dongle, I can get Wi-Fi working by enabling the wpa_supplicant@wlan0 systemd service. This uses the /etc/wpa_supplicant/wpa_supplicant@wlan0.conf file and specifies the wlan0 interface.

I understand the wpa_supplicant systemd service does the same thing, except it autodetects the wireless interface, but starting this service instead doesn't work, even when I have a valid /etc/wpa_supplicant/wpa_supplicant.conf file.

How would I use the wpa_supplicant systemd service to autodetect the wireless interface and setup my Wi-Fi?

If autodetection is not what the wpa_supplicant service does, what is the point of the wpa_supplicant service vs the wpa_supplicant@interface service?

  • Try with the configuration file wpa_supplicant@.conf
    – Dalvenjia
    May 8, 2017 at 21:42
  • I believe /etc/wpa_supplicant/wpa_supplicant@wlan0.conf should be /etc/wpa_supplicant/wpa_supplicant-wlan0.conf. In other words, the service uses the @ but the conf file uses -. Feb 4, 2020 at 4:38

2 Answers 2


As stated on here, the wpa_supplicant.service file is for DBus aware services, so it will be autodetected by NetworkManager for example. As I imagine you are not using NetworkManager, either you have to write a program/script that will use DBus information to lift the interface or use the specific interface version wpa_supplicant@.service. Quoting:

The wpa_supplicant package provides multiple systemd service files:

wpa_supplicant.service - uses D-Bus, recommended for NetworkManager users.

wpa_supplicant@.service - accepts the interface name as an argument and starts the wpa_supplicant daemon for this interface. It reads a /etc/wpa_supplicant/wpa_supplicant-interface.conf configuration file.

wpa_supplicant-nl80211@.service - also interface specific, but explicitly forces the nl80211 driver (see below). The configuration file path is /etc/wpa_supplicant/wpa_supplicant-nl80211-interface.conf.

wpa_supplicant-wired@.service - also interface specific, uses the wired driver. The configuration file path is /etc/wpa_supplicant/wpa_supplicant-wired-interface.conf.



The wpa_supplicant@.service installed with the wpa_supplicant package from pacman at /usr/lib/systemd/system/wpa_supplicant@.service is a dynamic service file which allows a service such as wpa_supplicant@wlan0 to be managed. It will look for a wpa_supplicant configuration file at /etc/wpa_supplicant/wpa_supplicant-wlan0.conf, where the wlan0 in the filename corresponds to the wlan0 in the service name.

If your nic uses the nl80211 driver, you may use the wpa_supplicant-nl80211@.service in the same way. The configuration file it looks for is /etc/wpa_supplicant/wpa_supplicant-nl80211-<interface>.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.