80 lines
4.4 KiB
HTML
80 lines
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>4.3 Shutting Down</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="4.3 Shutting Down">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3872 HREF="node166.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3870 HREF="node155.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3864 HREF="node164.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3874 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3875 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3873 HREF="node166.html">4.4 Managing Users</A>
|
|
<B>Up:</B> <A NAME=tex2html3871 HREF="node155.html">4 System Administration</A>
|
|
<B> Previous:</B> <A NAME=tex2html3865 HREF="node164.html">4.2.2 Using LILO</A>
|
|
<BR> <HR> <P>
|
|
<H1><A NAME=SECTION00630000000000000000>4.3 Shutting Down</A></H1>
|
|
<P>
|
|
<A NAME=secsysadmshutdown> </A>
|
|
<P>
|
|
<A NAME=4315> </A>
|
|
<A NAME=4316> </A>
|
|
Shutting down a Linux system is a bit tricky. Remember that you should
|
|
never just turn off the power or hit the reset switch while the system
|
|
is running. The kernel keeps track of disk I/O in memory buffers. If
|
|
you reboot the system without giving the kernel the chance to write
|
|
its buffers to disk, you can corrupt your filesystems.
|
|
<P>
|
|
Other precautions are taken at shutdown time as well. All processes
|
|
are sent a signal, which allows them to die gracefully (writing and
|
|
closing all files, and so on). Filesystems are unmounted for safety.
|
|
If you wish, the system can also alert users that the system is going
|
|
down and give them a change to log off.
|
|
<P>
|
|
<A NAME=4344> </A>
|
|
The easiest way to shutdown is with the <tt>shutdown</tt> command. The
|
|
format of the command is
|
|
<P><TT> shutdown <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img248.gif"> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img249.gif"> <P></TT>
|
|
The <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img250.gif"> argument is the time to shutdown the system (in
|
|
the format <em>hh:mm:ss</em>), and <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img251.gif"> is a message
|
|
displayed on all user's terminals before shutdown. Alternately, you
|
|
can specify the <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img252.gif"> as ``<tt>now</tt>'', to shutdown
|
|
immediately. The <tt>-r</tt> option may be given to <tt>shutdown</tt> to
|
|
reboot the system after shutting down.
|
|
<P>
|
|
For example, to shutdown the system at 8:00pm, use the command
|
|
<P><TT> # <em>shutdown -r 20:00</em>
|
|
<P></TT>
|
|
<P>
|
|
<A NAME=4345> </A>
|
|
The command <tt>halt</tt> may be used to force an immediate shutdown,
|
|
without any warning messages or grace period. <tt>halt</tt> is useful
|
|
if you're the only one using the system, and want to shut down the
|
|
system and turn it off.
|
|
<P>
|
|
<IMG ALIGN=BOTTOM ALT="(WARN)" SRC="bdt.gif">Don't turn off the power or reboot the system until you
|
|
see the message:
|
|
<P><TT> The system is halted
|
|
<P></TT>
|
|
It is very important that you shutdown the system ``cleanly'' using
|
|
the <tt>shutdown</tt> or <tt>halt</tt> commands. On some systems, pressing
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img253.gif"> will be trapped and cause a <tt>shutdown</tt>; on other
|
|
systems, however, using the ``Vulcan nerve pinch'' will reboot the
|
|
system immediately and may cause disaster.
|
|
<P>
|
|
<A NAME=4342> </A>
|
|
<A NAME=4343> </A>
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3872 HREF="node166.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3870 HREF="node155.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3864 HREF="node164.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3874 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3875 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3873 HREF="node166.html">4.4 Managing Users</A>
|
|
<B>Up:</B> <A NAME=tex2html3871 HREF="node155.html">4 System Administration</A>
|
|
<B> Previous:</B> <A NAME=tex2html3865 HREF="node164.html">4.2.2 Using LILO</A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|