答案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
(同情我們的肌肉記憶)。