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?

More than 3 years have passed since last update.

【Linux】ランレベルについて

Last updated at Posted at 2021-11-01
1 / 7

概要

SysVinitを採用しているシステムでは、ランレベルと呼ばれるいくつかの動作モード存在。
ランレベルごとに、どのようなサービスを起動させるのか(起動させないのか)を決定できる。


Red Hat Enterprize Linux, CentOSでのランレベル

ランレベル 説明
0 停止
1 シングルユーザモード
2 マルチユーザモード
3 マルチユーザモード
4 未使用
5 マルチユーザモード
6 再起動

Ubuntu, Debianでのランレベル

ランレベル 説明
0 停止
1 シングルユーザモード
2 マルチユーザモード
3 マルチユーザモード
4 マルチユーザモード
5 マルチユーザモード
6 再起動

ランレベルの確認

現在のランレベルを確認するにはrunlevelコマンドを使用

# runlevel
N 3

runlevelコマンドは現在のランベルト、その前のランレベルを表示する。
上記コマンドは、現在のランレベルは「3」その前のランレベルは「N」。
起動直後でランレベルが設定されていないため「N」になっている。


ランレベルの変更

ランレベルの変更はrootでinitまたはtelinitコマンドを使用。

# init 1

上記コマンドはランレベル1「シングルユーザモード」へ移行している。


補足

SysVinitについて

SysVinitとは、システムの電源を入れてからLinuxが起動するまでの初期プロセスのこと。

SysVinitの他にも

  • Upstart
  • systemd

がある。

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?