10

I can't seem to be able to Google this easily and I'm not exactly sure where to find more information.

I'm using Ubuntu 16.04 and my Systemd shows both network-manager.service and NetworkManager.service. Are both of these based on the network-manager program or is this something else?

enter image description here

1 Answer 1

9

There is no difference.

The unit file for network-manager.service is a symlink to NetworkManager.service.

$ file $(locate network-manager.service)
/lib/systemd/system/network-manager.service: symbolic link to NetworkManager.service

The "two" services are the same process:

$ systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-05-28 06:51:58 BST; 25min ago
     Docs: man:NetworkManager(8)
 Main PID: 667 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           ├─ 667 /usr/sbin/NetworkManager --no-daemon
           └─1277 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-wlan0.pid -lf /var/lib/NetworkManager/dhclient

$ systemctl status network-manager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-05-28 06:51:58 BST; 25min ago
     Docs: man:NetworkManager(8)
 Main PID: 667 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           ├─ 667 /usr/sbin/NetworkManager --no-daemon
           └─1277 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-wlan0.pid -lf /var/lib/NetworkManager/dhclient

The name network-manager remains simply for compatibility, so people can use old style commands like sudo service network-manager restart (sympathy for our muscle memory).

5
  • Thanks for the answer, but I seem to be getting a different result. sudo systemctl status network-manager.service returns active while sudo systemctl status NetworkManager.service returns inactive(dead)
    – Rtsne42
    May 28, 2017 at 6:38
  • o.O mind blown. Do you want to paste your full results?
    – Zanna
    May 28, 2017 at 6:42
  • I was just in the process of reinstalling the network manager so that's most likely why it shows as inactive(dead) Screenshot .
    – Rtsne42
    May 28, 2017 at 6:46
  • thanks for the update @Rtsne42 my tranquility is restored :D
    – Zanna
    May 28, 2017 at 6:57
  • 1
    It seems that this can not be used anymore: $ sudo service network-manager restart Failed to restart network-manager.service: Unit network-manager.service not found.
    – Good Pen
    May 19, 2023 at 9:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .