Question | Answer |
A collection of services that define a specific system state | Runlevel |
Runlevel: Single user mode - user automatically logged in as root (no GUI) - often for maintenance | 1 |
Multi-user mode - allows multiple user logins -networking services except Network Files Systems (no GUI) | 2 |
Extended multi-User mode -Multi- user suppot and offers all network services (No GUI) | 3 |
Halt state -systems has no daemons in memory and is ready to be turned off | 0 |
Runlevel is undefined, but can be customized | 4 |
Graphical mode (GUI) -provides same capabilities as in 'extended mode' but supports graphical logins | 5 |
Reboot - system restarts itself | 6 |
init process uses the ----- file to determine the DEFAULT runlevel | /etc/inittab |
Format of the /etc/inittab file: | Label:Runlevel(s):Actions:Command |
/etc/inittab Fields: Organizes the file to allow the init daemon to read it alphabetically | label |
/etc/inittab Fields: Specifies the runlevel(s) to which the line corresponds | runlevel(s) |
/etc/inittab Fields: Tells init what action to take (e.g. respawn, wait, boot, bootwait, powerfail, and powerwait | action |
/etc/inittab Fields: designates a shell command to execute | command |
/etc/inittab Example: Runs the special script (/sbin/custom) for runlevels 1,2,3 | cmd:123:wait:/sbin/custom |
Display the previous and current runlevel | runlevel |
Runlevel command o/p = 3 5 | The first number is the PREVIOUS runlevel
The second number is the CURRENT runlevel |
Change the runlevel of the computer | init {runlevel) - init 3 = change to runlevel 3
telinit {runlevel} - telinit 5 = change to runlevel 5 |
Have init re-examine the inittab file | init q
init Q |
Line in /etc/inittab file that defines the DEFAULT runlevel (e.g. runlevel 3) | id:3:initdefault: |