What's the difference between network-manager.service and NetworkManager.service in Systemd?

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


Solution 1:

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).