I have recently installed Arch Linux on my laptop. I have setup the Wi-Fi without problem using wpa_supplicant, however it does not automatically start this on boot, and every time my system boots up, I have to manually run the following commands to reconnect:

sudo ip link set wlp2s0 up
sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlp2s0
sudo dhclient wlp2s0

It gets pretty frustrating having to do this on every boot, so I am asking is there a way to automatically run these commands on boot?

I am using Plasma as the desktop environment, and a regular user account with sudo access (not the root user).

To be clear, the /etc/wpa_supplicant.conf file is set up perfectly fine, I just need to be able to automatically activate it on bootup, using the commands above.

  • What about your /etc/network/interfaces? – Philippos Oct 4 '19 at 21:37
  • Have you tried this? For Autostarting in general see Autostarting. I like to throw all lines into ~/.xprofile – Devon Oct 5 '19 at 16:20
  • @Devon Thanks I have read through this – Daniel Massey Oct 6 '19 at 10:57
  • @Philippos it says enp0s3, but I don't have Ethernet available (and no port on my laptop), my main interface which is not shown here is wlp2s0 – Daniel Massey Oct 6 '19 at 10:58
  • Given that you don't use some other network management tool, why don't you put an iface allow-hotplug section in your interfaces config to auto-up the interface? – Philippos Oct 6 '19 at 11:18

Your Answer

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

Browse other questions tagged or ask your own question.