System administrations

The /etc/inittab file holds instructions for your system on how to manage terminal devices. A line in the /etc/inittab file has four basic components: an ID, a runlevel, an action, and a process.

Terminal devices are identified by ID numbers, beginning with 1 for the first device. The runlevel at which the terminal operates is usually 1. The action is usually respawn, which means to run the process continually. The process is a call to the mingetty, mgetty, or agetty with the terminal device name.

Wrong editing in this file could be dangerous even it could crash Linux system. We suggest you to take back up first before editing in this file.

#cp /etc/inittab  /root

With this file you can change default run level, increase virtual terminals and disable ALT+CTRL+DEL key combination to restart the system.

After taking backup open /etc/inittab file

vi inittab

Change Default Run Level

Linux have seven run levels. Functions of all run level are

default runlevel of linux  runlevel

During system startup process Linux check this file to determines which runlevel it should be boot by looking at the initdefault directive in /etc/inittab. For example, the entry


shows a default starting point in runlevel 5, which is associated with the GUI

To change this default runlevel locate this tag id:5:initdefault: Now replace the value 5 to 3 as show here to boot system in run level 3 Save the file and restart the system it will boot now in run level 3.

id tag

How to disable ALT+CTRL+DEL key combination

By default ALT+CTRL+DEL key combination is used to restart the system. This default behavior is also controlled by this tag in /etc/inittab file.

alt ctrl delete tag

By some mean if you don't want to use ATL+CTRL+DEL key to restart the system. Put a hash # sign to this tag and save the file and restart the system. Now you cannot restart the by ATL+CTRL+DEL key.

put hash sign to alt ctrl tag

How to increase the number of virtual consoles

Virtual consoles are configured in /etc/inittab. By default, RHEL is configured with six virtual consoles. You can configure up to twelve virtual consoles in /etc/inittab.

Here are the default /etc/inittab entries for the first six virtual consoles:

locate tty line in inittab

To increase the number of virtual console copy the configuration line of last virtual console and past just below the default line and change the number as shown in image. Save file and restart the system.

increased virtual terminals

After restart you can login in to increased terminals by pressing ALT+Funcation key combinations.

login in to tty8

Other use full commands

 #init [run level] 

command init

With this command you can switch between run levels. For example to go on run level one type

 #init 1 

This will take you on run level one.

 #telinit 1 

telinit commands

Same as init. This will also take you on run level one.


runlevel commands

To know on which run level are you working now use runlevel commands