Skip to content

wpa_supplicant

core command

# wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf

configs

/etc/wpa_supplicant/wpa_supplicant-wlp3s0.conf
1
2
3
ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
/etc/systemd/system/wpa_supplicant@.service
[Unit]
Description=WPA supplicant daemon (for interface %I)
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
Before=network.target
Wants=network.target

# NetworkManager users will probably want the dbus version instead.

[Service]
Type=simple
ExecStart=/usr/bin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

This is enabled by sudo systemctl start wpa_supplicant@wlp3s0.service

If you don't want interface specific configs, and start it with sudo systemctl start wpa_supplicant.service:

/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/run/wpa_supplicant
update_config=1
/etc/systemd/system/wpa_supplicant.service
[Unit]
Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-wlp3s0.device
After=sys-subsystem-net-devices-wlp3s0.device
Before=network.target
Wants=network.target

# NetworkManager users will probably want the dbus version instead.

[Service]
Type=simple
ExecStart=/usr/bin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlp3s0

[Install]
WantedBy=multi-user.target

Check out:


Comments