diff --git a/command/systemctl.md b/command/systemctl.md index d4b41c7a36e..4a474c9cb0d 100644 --- a/command/systemctl.md +++ b/command/systemctl.md @@ -23,7 +23,9 @@ systemctl ```shell systemctl start nfs-server.service . # 启动nfs服务 systemctl enable nfs-server.service # 设置开机自启动 +systemctl enable nfs-server.service --now # 设置开机自启动,并立刻启动 systemctl disable nfs-server.service # 停止开机自启动 +systemctl disable nfs-server.service --now # 停止开机自启动,并立刻停止 systemctl status nfs-server.service # 查看服务当前状态 systemctl restart nfs-server.service # 重新启动某服务 systemctl list-units --type=service # 查看所有已启动的服务