Professional Documents
Culture Documents
Sysvinit Cheat Sheet: by Via
Sysvinit Cheat Sheet: by Via
Configuration File wait Determine when and how The contents of the rc*.d directories are
/etc/inittab System V init runs the command actually symbolic links to files in yet another
respawn Run the command that follows directory, init.d. A large number of symbolic
Configuration Syntax
and, if the command finishes links across several subdirectories such as
id:2:initdefault: this is called a link farm.
executing, to run it again
id - A unique indentifier
ctrlaltdel Controls what the system does
2 - The applicable runlevel number Controlling System V init
when you press CTRL + ALT +
initdefault - The action that init should
DEL telinit 3 Switch to runlevel 3
take
(optional) A command to execute sysinit Run this action except when in telinit q Reload inittab file
emergency mode telinit s Switch to single-user mode
Configuration Directories
initde‐ This is the default action
/etc/init.d/
fault
/etc/rc$.d/
Runlevels
Starting and Stopping Services
0 Halt
To start and stop services by hand, use the
1 Single-user text mode
script in the /etc/init.d directory. For
example, one way to start the httpd daemon 2 Not used (user-definable)
manually is to run /etc/init.d/httpd start. 3 Full multi-user text mode
Similarly, to kill a running service, you can
4 Not used (user-definable)
use the stop argument. See, /etc/init.d/httpd
5 Full multi-user graphical mode (with an
for supported argument.
X-based login screen)
6 Reboot
cheatography.com/misterrabinhalder/