From 5a574c8c69b1852c6403eecdc76a8dd6d5b7c5dc Mon Sep 17 00:00:00 2001 From: 0x_000 <32635468+loprx@users.noreply.github.com> Date: Tue, 14 May 2024 22:03:40 +0800 Subject: [PATCH] doc: update systemctl.md (#578) --- command/systemctl.md | 2 ++ 1 file changed, 2 insertions(+) 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 # 查看所有已启动的服务