I am running a Gentoo system with the runit init system. I can't seem to start NetworkManager as while I've set up a service for it with a run file I copied from Void Linux and enabled it (by running ln -sf /etc/sv/networkmanager /etc/service) it doesn't seem to be running (and yes the dbus service is running). I've created a package to provide this NetworkManager service and it is here, in case this issue interests you. By doesn't seem to I mean running nmtui returns:

NetworkManager is not running.

So as a temporary workaround I'm wondering if there is any way to connect to the WiFi without needing the NetworkManager daemon running. Likewise wpa_supplicant doesn't seem to work. As I ran:

wpa_supplicant -B -i interface -c <(wpa_passphrase SSID passwd)
dhclient interface

Where, of course, SSID is replaced with my SSID and passwd with my interface's password and still ping www.google.com returns the classic:

ping: unknown host www.google.com

this last command (dhclient interface) took about a minute and a half to complete, while the wpa_supplicant command immediately finished.

I have set up the wpa_supplicant daemon to run with:

sudo ln -sf /etc/sv/wpa_supplicant /etc/service/

where my wpa_supplicant run file I got from Void too. I can confirm that wpa_supplicant was running in the background, as ps ax | grep wpa returns:

 2651 ?        Ss     0:00 runsv wpa_supplicant
 3192 ?        Ss     0:00 wpa_supplicant -B -i wlo1 -c /proc/self/fd/11
18843 ?        Ss     0:00 wpa_supplicant -B -i wlo1 -c /proc/self/fd/11
22662 ?        Ss     0:00 wpa_supplicant -B -i wlo1 -c /proc/self/fd/11

where, of course, wlo1 is my WiFi interface.

  • No , Network manager depend on the wpa_supplicant daemon , you can connect through wpa_supplicant. test it wpa_supplicant -B -i interface -c <(wpa_passphrase SSID passwd) then run dhclient – GAD3R Nov 26 '17 at 9:37

You can connect to Wifi on linux system through wpa_supplicant , you don't need the network-manager , the nmtui is a text user interface for network-manager.

Check if there are a wpa_supplicant already running through ps command , make sure to kill process killall wpa_supplicant before using the wpa_supplicant command.

To temporary connect without creating a configuration file:

killall wpa_supplicant
wpa_supplicant -B -i <interface> -c <(wpa_passphrase SSID password)

To connect using a configuration file:

create a /etc/wpa_supplicant/wpa_supplicant.conf file with the following content:



To configure some access point use:

wpa_passphrase SSID password >> /etc/wpa_supplicant/wpa_supplicant.conf


killall wpa_supplicant
wpa_supplicant -B -i <interface> -c /etc/wpa_supplicant/wpa_supplicant.conf

Also you can use the wpa_cli tool to manage and connect through the cli.

Gentoo wiki : wpa_supplicant

| improve this answer | |
  • Tried it unfortunately it doesn't work for me. Running ping www.google.com returns the classic unable to resolve host error. – Josh Pinto Nov 26 '17 at 10:08
  • @BH2017 maybe your are missing the configuration of dhcpcd and the net script mentioned on the Gentoo wiki. – GAD3R Nov 26 '17 at 10:11
  • @BH2017 Do not forget to kill the runing process of wpa_supplicant : killall wpa_supplicant – GAD3R Nov 26 '17 at 10:16
  • The Wiki says, "All dhcpcd configuration can be set in the /etc/dhcpcd.conf file, but for most installations dhcpcd will work out of the box presuming most computers nowadays are behind a router or access point running a DHCP server." So shouldn't I need no config file? How do I set up the config file? Should I use what's mentioned with "Static IP addresses", I don't know my IP, how do I determine it? I saw if-not-true-then-false.com/2010/linux-get-ip-address but ifconfig isn't present on my Gentoo system. The article is old so I'm wondering if it's because it's deprecated. – Josh Pinto Nov 26 '17 at 10:18
  • 1
    Gave it a go and assuming doing the "To connect using a configuration file" stuff earlier wouldn't obscure the result of rebooting and doing the first part it worked. I'd suggest you mention the possible need to run killall wpa_supplicant in your answer. – Josh Pinto Nov 26 '17 at 11:22

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.