答案1
没有区别。
的单元文件network-manager.service
是 的符号链接NetworkManager.service
。
$ file $(locate network-manager.service)
/lib/systemd/system/network-manager.service: symbolic link to NetworkManager.service
“两个”服务是相同的流程:
$ 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
保留该名称network-manager
仅仅是为了兼容性,因此人们可以使用旧式命令(例如sudo service network-manager restart
(同情我们的肌肉记忆)。