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][system][command] systemdの管理_systemctl

Last updated at Posted at 2025-02-12

systemctlコマンド

# systemctl サブコマンド [unit名] 
サブコマンド 英語の由来 説明
enable enable サービスの自動起動を有効にする
disable disable サービスの自動起動を無効にする
start start サービスを起動する
stop stop サービスを停止する
restart restart サービスを再起動する
reload reload サービスの設定ファイルを再読み込みする
status status サービスの状態を表示する
is-active is active サービスが起動しているか確認する
list-unit-files list unit files システム内のすべてのユニットファイルを一覧表示する
get-default get default 次回起動時のデフォルトのターゲット(ランレベル)を表示する
set-default set default 次回起動時のデフォルトのターゲット(ランレベル)を設定する
default
Ctrl+D
default 現在のターゲットをデフォルトのターゲットに変更する
reboot reboot システムを再起動する
rescue rescue システムをレスキューモード(シングルユーザーモード)に移行する
halt halt システムを停止し、電源は切断せず、CPUの動作を停止する
poweroff poweroff システムを停止し、電源を切断する

ランレベルとターゲット

ランレベル ターゲット
対象初期化システム 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?