系統服務控制 systemctl
# 設為開機自啟動/取消自啟動
systemctl enable/disable xxxx.service
# 基本啟停操作
systemctl start/stop/restart xxxx.service
# 檢視狀態
systemctl status xxxx.service
# 檢視服務列表
systemctl list-units --type=service
Docker容器
# 列出容器
docker ps
# 設為開機自啟動/取消自啟動
systemctl enable/disable xxxx.service
# 基本啟停操作
systemctl start/stop/restart xxxx.service
# 檢視狀態
systemctl status xxxx.service
# 檢視服務列表
systemctl list-units --type=service
# 列出容器
docker ps