# 将服务加入开机自启动
systemctl enable Service_Name

# 禁止服务开机自启动
systemctl disable Service_Name

# 查看服务是否开机自启动
systemctl is-enabled Service_Name

# 查看所有开机自启动服务
systemctl list-unit-files --type service | grep 'enabled'

systemctl enable sshd          # 服务名
systemctl enable sshd.service  # 服务对应的unit文件

systemctl --force enable Service_Name

标签: none

添加新评论