我们看一下/etc/services
文件可以发现:只有ssh
服务:
在Debian及其衍生版中(例如Ubuntu),使用相同的名称来启动该服务:
service ssh start
/etc/init.d.ssh
systemctl start ssh.service/sshd.service
以上三者可以认为是等价的
查看/lib/systemd/system/ssh.service
文件还可以发现,sshd.service
只是一个别名(作用应该是为了和其他发行版兼容):
[Install]
WantedBy=multi-user.target
Alias=sshd.service