29

Is it possible to get Network Manager working on Raspbian? It's easy to install with:

sudo apt-get install network-manager

but I couldn't get it to manage any of my connections. Unfortunately, it looks like only a old version of NM is available in the Debian repo.

Milliways
  • 62,573
  • 32
  • 113
  • 225
Cerin
  • 2,291
  • 8
  • 33
  • 49

6 Answers6

34

I have found how to get NetworkManager (and systemd-resolved) working on Raspbian 9 (Stretch). NetworkManager is very useful when you need to manage multiple VPN connections with split DNS, wifi networks and other advanced network settings directly from the Pixel Desktop.

Here is how to do it:

  1. Install the needed packages with the following command:

    sudo apt install network-manager network-manager-gnome openvpn \
    openvpn-systemd-resolved network-manager-openvpn \
    network-manager-openvpn-gnome
  2. Remove unneded packages:

    sudo apt purge openresolv dhcpcd5
  3. Replace /etc/resolv.conf with a symlink to /lib/systemd/resolv.conf:

    (do not execute this command on Raspbian 10, it will break your DNS)

    [only for Raspbian 9, not 10]
    sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf
  4. Now go to the top of your screen and reconfigure the panel:

    1. Open "Panel Settings"
    2. In "Panel Applets" remove the "Wireless & Wired Network" item.
    3. The network manager applet should appear after a reboot.
jathanasiou
  • 103
  • 1
giox069
  • 441
  • 4
  • 4
14

This page ranks quite highly in search results for people looking for networking help on Raspberry Pi. Unfortunately, the steps detailed here are out-of-date as of Feb 2020.

At that point in time, to get Network Manager handling wifi on current Pi OS:

sudo apt update
sudo apt install network-manager network-manager-gnome

Check /etc/network/interfaces - it should be empty except for an include from /etc/network/interfaces.d. Now edit /etc/dhcpcd.conf and add:

denyinterfaces wlan0

edit /etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifupdown,keyfile
dhcp=internal

[ifupdown] managed=true

Restart, and you should have Network Manager in your menu bar, handling the wifi interface.

I've a few more details of what I did to make this work in this gist, including an alternative approach using a configuration file in /boot.

Unfortunately, I can't confirm that any of this still works as I no longer have access to the corporate network which requires Network Manager. But comments on the gist suggest that it's worked for at least some others. Good luck!

9

Try using wicd:

sudo apt-get install wicd

Wicd is a network manager application (wireless and wired), it a good alternative to Network Manager

sam coleman
  • 175
  • 4
3

Chien's answer will create a non persistent change and dhcpcd will restart after after reboot. The clash will give the device two IPs per interface.

A persistent solution would be:

sudo apt install network-manager
# for gui systems "sudo apt install network-manager network-manager-gnome"
sudo systemctl stop dhcpcd.service 
sudo systemctl disable dhcpcd.service
sudo service network-manager restart
James
  • 31
  • 1
2

As of today (2023), Raspberry Pi OS (former Raspbian) comes with NetworkManager support, but it is disabled by default. To enable, run those commands:

sudo apt update
sudo apt install network-manager network-manager-gnome

This command will enable NetworkManager, without needing to jump through GUI:

sudo raspi-config nonint do_netconf 2 sudo reboot

After reboot (for GUI), NetworkManager will be used.

And nmcli will work as expected, e.g. nmcli dev wifi will scan and list all visible WiFi APs.

iva2k
  • 121
  • 1
0

The following worked for me:

sudo apt install network-manager network-manager-gnome
sudo service dhcpcd stop 
sudo service network-manager restart
Chien
  • 1