Changing runlevels with telinit in Red Hat

Changing runlevels with telinit in Red Hat

The telinit command is used to change the runlevel of a Linux system. The runlevel is a number that represents the current state of the system. For example, runlevel 0 is halt, runlevel 1 is single-user mode, and runlevel 2 is multi-user mode.

To change the runlevel with telinit, you can use the following syntax:

Bash
telinit <runlevel>

For example, to change the runlevel to 3 (multi-user mode), you would use the following command:

Bash
telinit 3

You can also use the -f option to force the change of runlevel, even if there are running services that would normally prevent the change. For example, to force the change to runlevel 3, you would use the following command:

Bash
telinit -f 3

The following table lists the available runlevels:

RunlevelDescription
0Halt
1Single-user mode
2Multi-user mode
3Full multi-user mode
4Not used
5Graphical mode
6Reboot
SSame as runlevel 1, but used for system maintenance

The default runlevel is usually set in the /etc/inittab file. You can change the default runlevel by editing this file.

Total
0
Shares

Leave a Reply

Previous Post
Organizing Scheduled Tasks in Red Hat

Organizing Scheduled Tasks in Red Hat

Next Post
runlevel command in Red Hat and it perimeters

runlevel command in Red Hat and it perimeters

Related Posts