chkconfig –add ‘name’
Add a new service to be managed by chkconfig. As part of adding the service, chkconfig makes sure the service has a start or kill entry at every runlevel.
chkconfig –add atd
starts the atd daemon
chkconfig –add ypserv
starts the ypserv daemon
chkconfig –del name
Remove a service from chkconfig management. As part of the removal, symbolic links to the service are removed from /etc/rc0-6.d.
chkconfig –del ldap
removes the ldap daemon
chkconfig –del irda
removes the irda daemon
chkconfig –level ‘level’ ‘name’
Specify the level to which a service should belong.
chkconfig –level 5 lpd specifies level 5 for the lpd daemon
chkconfig –level 15 ntpd specifies levels 1 and 5 for the ntpd daemon.
chkconfig –level ‘level’ ‘name’ on|off|reset
Starts, stops, or resets the named service in the specified runlevel.
The on and off options affect levels 2, 3, 4, and 5.
chkconfig –level 345 nfslock off
turns the nfslock daemon off in runlevels 3, 4, and 5
chkconfig ypxfrd on
turns the yp transfer daemon on in levels 2, 3, 4, 5
View a list of services and their runlevels.
If you use the name option, you’ll only get information for the named service.
Change the system runlevel.
init 0 changes the system to runlevel 0, shutting the system down
init 1 changes the runlevel to 1, which is single-user mode, often used for maintenance tasks.
to View the current runlevel.
Init uses the /etc/inittab file to determine the system runlevel and load daemons.Below describes the format of the lines in the inittab file (the inittab uses a colon-delimited format).
This field organizes the file to allow the init daemon to read it alphabetically.
This field specifies the runlevel(s) to which the line corresponds.
This field tells init what action to take (e.g., respawn, wait, boot, bootwait, powerfail, powerwait).
This field designates a shell command to execute.