Main Navigation
Home Realm LinuxSeveral times in this book we've mentioned the necessity of activating or deactivating services that start up at boot time. Now we'll go ahead and explain how to enable and disable those services as well as to activate or deactivate them. We'll use the sendmail service for our examples.
Please note that all of the following commands must be run as root. To enable the sendmail service so that it starts at the next system boot, you would enter:
# /sbin/chkconfig [––level {level(s)}] sendmail on
#
The optional “––level” parameter restricts the effects of this command to the specified runlevel(s). Note that this does not turn the sendmail daemon on immediately; it simply modifies the startup files so that the daemon is started at boot the next time the system is booted.
To disable sendmail startup, you would enter the following:
# /sbin/chkconfig [––level {level(s)}] sendmail off
#
To turn the sendmail daemon on immediately, enter the following:
# /sbin/service sendmail start #
To turn the daemon off immediately, enter the following:
# /sbin/service sendmail stop #