systemd の使い方
作成: 2026.03.12更新: 2026.03.12
systemd とは
systemd は Linux のシステムおよびサービスマネージャ。
基本コマンド
# サービスの起動
sudo systemctl start nginx
# サービスの停止
sudo systemctl stop nginx
# 自動起動の有効化
sudo systemctl enable nginx
# ステータス確認
sudo systemctl status nginx
ユニットファイル
/etc/systemd/system/ にユニットファイルを配置してカスタムサービスを定義できる。