🧀 Learn Linux

進階 · 管理服務

systemctl:查詢與管理 systemd 服務

放入自由練習

語法

systemctl 動作 [服務]

參數

status / is-active
查看狀態
start / stop / restart
控制服務
enable / disable
控制開機啟動
list-units
列出服務

範例

sudo systemctl start nginx

使用說明與支援範圍

模擬 nginx 服務。 enable 和 start 是不同操作;並非所有 Linux 都會使用 systemd。

動手練習

完整文檔 ↗

同主題指令