Show Menu
Cheatography

Config­uration

Config­uration File
/etc/i­nittab
Config­uration Syntax
id:2:i­nit­def­ault:
id - A unique indent­ifier
2 - The applicable runlevel number
initde­fault - The action that init should take
(optional) A command to execute
Config­uration Direct­ories
/etc/i­nit.d/
/etc/r­c$.d/

Starting and Stopping Services

To start and stop services by hand, use the script in the /etc/i­nit.d directory. For example, one way to start the httpd daemon manually is to run /etc/i­nit.d/­httpd start. Similarly, to kill a running service, you can use the stop argument. See, /etc/i­nit.d/­httpd for supported argument.
 

Inittab Actions

wait
Determine when and how System V init runs the command
respawn
Run the command that follows and, if the command finishes executing, to run it again
ctrlaltdel
Controls what the system does when you press CTRL + ALT + DEL
sysinit
Run this action except when in emergency mode
initde­fault
This is the default action

Runlevels

0
Halt
1
Single­-user text mode
2
Not used (user-­def­inable)
3
Full multi-user text mode
4
Not used (user-­def­inable)
5
Full multi-user graphical mode (with an X-based login screen)
6
Reboot
 

Link Farm

The contents of the rc*.d direct­ories are actually symbolic links to files in yet another directory, init.d. A large number of symbolic links across several subdir­ect­ories such as this is called a link farm.

Contro­lling System V init

telinit 3
Switch to runlevel 3
telinit q
Reload inittab file
telinit s
Switch to single­-user mode
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          UV Cheatsheet Keyboard Shortcuts

          More Cheat Sheets by misterrabinhalder

          RPM Cheat Sheet