Running Programs At Boot Time; Shutting Down - Red Hat LINUX 7.2 Reference Manual

Hide thumbs Also See for LINUX 7.2:
Table of Contents

Advertisement

56

3.5 Running Programs at Boot Time

The file /etc/rc.d/rc.local script is run by init at boot time, after all other initialization is
complete, and whenever you change runlevels. You can add additional initialization commands here.
For instance, you may want to start up additional daemons or initialize a printer.
In addition, if you require serial port setup, you can create and edit /etc/rc.serial, and it will
be executed automatically at boot time. This script can run a number of setserial commands to
specially configure the system's serial ports. See the setserial man page for more information.

3.6 Shutting Down

To shut down Red Hat Linux, issue the shutdown command. You can read the shutdown man
page for complete details, but the two most common uses are:
/sbin/shutdown -h now
/sbin/shutdown -r now
You must run shutdown as root. After shutting everything down, the -h option will halt the machine,
and the -r option will reboot.
Although the reboot and halt commands are now able to invoke shutdown if run while the
system is in runlevels 1-5, it is a bad habit to get into, as not all Linux-like operating systems have this
feature.
If your computer does not power itself down, you should not turn off the
computer until you see a message indicating that the system is halted or
finished shutting down.
Failure to wait for this message will mean that you may be turning off
the machine before your hard drive partitions are unmounted. This can
cause filesystem corruption, even to the point where your system may
not boot the next time it attempts to start up. Be patient when halting
your system.
Chapter 3:Boot Process, Init, and Shutdown
WARNING

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux 7.2

Table of Contents