Showing posts with label run level. Show all posts
Showing posts with label run level. Show all posts

RHCE # Week # 276


Question: 

Which of the following run levels runs the system at single user mode?

A. 2
B. 3
C. 1
D. 0


Explanation:

Runlevels define what tasks can be accomplished in the current state (or runlevel) of a Linux system. Every linux system supports three basic runlevels, plus one or more runlevels for normal operation.

Linux Basic Runlevels
Level # Purpose
0 # Shut down or half the system
1 # Single-user mode, usually aliased as s or S
6 # Reboot the system

Other common linux runlevels (usage differs among distributions)
Level # Purpose
2 # Multiuser mode without networking
3 # Multiuser mode with networking
5 # Multiuser mode with networking and the X Window System

Answer:  C

RHCE # Week # 269

Question: 

In a Linux computer, which of the following files defines run levels for the processes to be started up during boot up?

A. /etc/syslog.conf
B. /etc/lilo.conf
C. /etc/runlevel
D. /etc/inittab

Explanation:

In Linux, the /etc/inittab file describes the processes that are started up during boot up.
It specifies run levels for each processes.

The format of an entry in the /etc/inittab file is as follows:

id:runlevels:actions:process
   
where,
  • id spcifies a unique sequence of 1-4 characters, which identifies an entry in the inittab file.
  • runlevels lists the run level of a process for which the specified action should be taken.
  • actions specifies which action should be taken.
  • process specifies the process to be executed.

Run Level

A run level is a state of a linux system, which defines which system services are operating. Following are some of the important run levels used by a linux system:

Run Level | Description
0       All processes are terminated and the computer comes to a helt.
1       This run level switches the system to a single-user mode. It is frequently used for system maintenance.
2       This run level is used for multiuser mode.
3,4    These run levels are used for multiuser mode with network services.
5       This run level is used for multiuser mode with network services and presents a graphical user interface.
   
  • The /etc/syslog.conf file contains the names and locations of system log files.
  • The /etc/lilo.conf file used by LILO for reading and editing its configuration information 
  • There is no file such as /etc/runlevel in linux. 

Answer: D