0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux][command] systemdの管理_systemctl

Last updated at Posted at 2025-02-12

systemctlコマンド

# systemctl サブコマンド [unit名] 
サブコマンド 英語の由来 説明
start start 指定したユニット(サービスなど)を開始する
stop stop 指定したユニット(サービスなど)を停止する
restart restart 指定したユニット(サービスなど)を再起動する
reload reload 設定ファイルを再読み込みする(プロセスの再起動なし)
status status 指定したユニットの現在の状態を表示する
enable enable 指定したユニットをシステム起動時に自動実行するよう設定する
disable disable 指定したユニットの自動起動を無効化する
mask mask 指定したユニットを無効化し、手動でも起動できないようにする
unmask unmask mask で無効化されたユニットを再び有効化できるようにする
is-active is active 指定したユニットが現在アクティブかどうかを確認する
is-enabled is enabled 指定したユニットが起動時に有効化されているかを確認する
daemon-reexec daemon re-execute systemd のバイナリを再実行する
daemon-reload daemon reload systemd の設定ファイルを再読み込みする
list-units list units 現在ロードされているユニットを一覧表示する
list-unit-files list unit files システム内のすべてのユニットファイルを一覧表示する
show show 指定したユニットの詳細情報を表示する
cat cat 指定したユニットの設定ファイルの内容を表示する
edit edit 指定したユニットの設定ファイルを編集する
reset-failed reset failed 失敗したユニットのエラー状態をリセットする
kill kill 指定したユニットのプロセスを強制終了する
get-default get default (次回起動時の)システムのデフォルトのターゲット(ランレベル)を表示する

ランレベルとターゲット

ランレベル ターゲット
対象初期化システム init(SysVinit) systemd
停止 0 poweroff.target
シングルユーザーモード 1 rescue.target
マルチユーザーモード
(テキストログイン)
2, 3, 4 multiuser.target
マルチユーザーモード
(グラフィカルログイン)
5 grafical.target
再起動 6 reboot.target

Ping-t

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?