235 lines
4.4 KiB
HTML
235 lines
4.4 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>System Shutdown and Restart</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
|
|
"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Administration Made Easy"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="General System Administration Issues"
|
|
HREF="administrative-issues.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Linux Password & Shadow File Formats"
|
|
HREF="shadow-file-formats.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Custom Configuration and Administration Issues"
|
|
HREF="custom-config.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Administration Made Easy</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="shadow-file-formats.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 6. General System Administration Issues</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="custom-config.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="SYSTEM-SHUTDOWN-AND-RESTART"
|
|
>6.7. System Shutdown and Restart</A
|
|
></H1
|
|
><P
|
|
>To shut down the system from a terminal session, sign in or
|
|
<SPAN
|
|
CLASS="QUOTE"
|
|
>"su"</SPAN
|
|
> to the <SPAN
|
|
CLASS="QUOTE"
|
|
>"root"</SPAN
|
|
> account. Then type
|
|
``<TT
|
|
CLASS="LITERAL"
|
|
>/sbin/shutdown -r now</TT
|
|
>''. It may take several moments
|
|
for all processes to be terminated, and then Linux will shut down. The
|
|
computer will reboot itself. If you are in front of the console, a
|
|
faster alternative to this is to press
|
|
<TT
|
|
CLASS="LITERAL"
|
|
><<B
|
|
CLASS="KEYCAP"
|
|
>Ctrl</B
|
|
>>-<<B
|
|
CLASS="KEYCAP"
|
|
>Alt</B
|
|
>>-<<B
|
|
CLASS="KEYCAP"
|
|
>Del</B
|
|
>></TT
|
|
>
|
|
to shut down. Please be patient as it may take a couple of minutes for
|
|
Linux to terminate.</P
|
|
><P
|
|
>You can also shut down the system to a halt (ie. it will shut down
|
|
and not reboot the system). The system will be unavailable until
|
|
power-cycled or rebooted with
|
|
<TT
|
|
CLASS="LITERAL"
|
|
><<B
|
|
CLASS="KEYCAP"
|
|
>Ctrl</B
|
|
>>-<<B
|
|
CLASS="KEYCAP"
|
|
>Alt</B
|
|
>>-<<B
|
|
CLASS="KEYCAP"
|
|
>Del</B
|
|
>></TT
|
|
>.
|
|
This can be useful if you need to power down the system and move it to a
|
|
different location, for example. To do this, type
|
|
``<TT
|
|
CLASS="LITERAL"
|
|
>/sbin/shutdown -h now</TT
|
|
>'' when signed into or
|
|
<SPAN
|
|
CLASS="QUOTE"
|
|
>"su"</SPAN
|
|
>ed to the <SPAN
|
|
CLASS="QUOTE"
|
|
>"root"</SPAN
|
|
> account. Linux will shut
|
|
itself down then display a message, <SPAN
|
|
CLASS="QUOTE"
|
|
>"System halted"</SPAN
|
|
>. At
|
|
this point you can power down the computer.</P
|
|
><P
|
|
>It is probably a good idea to only shut down the system when you are
|
|
at the console. Although you can shut it down remotely via a shell
|
|
session, if anything goes wrong and the system does not restart properly,
|
|
the system will be unavailable until action is taken at the system unit.
|
|
(I haven't experienced any problems doing this myself, however).</P
|
|
><P
|
|
>Upon system bootup, Linux will start automatically, and load all
|
|
necessary services including networking support, and Internet
|
|
services.</P
|
|
><DIV
|
|
CLASS="TIP"
|
|
><BLOCKQUOTE
|
|
CLASS="TIP"
|
|
><P
|
|
><B
|
|
>Tip: </B
|
|
>Tip: If you wish to provide some kind of warning to any online
|
|
users (online meaning logged in to shell accounts), you can substitute a
|
|
time value instead of the <SPAN
|
|
CLASS="QUOTE"
|
|
>"now"</SPAN
|
|
> keyword. You can also
|
|
customize the shutdown warning message. For example,
|
|
``<TT
|
|
CLASS="LITERAL"
|
|
>/sbin/shutdown -r +5 Hardware upgrade</TT
|
|
>'' would inform
|
|
users that the system was about to shutdown for the given reason. They
|
|
are then given periodic warnings that they should close files and log off
|
|
before the big moment arrives.</P
|
|
></BLOCKQUOTE
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="shadow-file-formats.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="custom-config.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Linux Password & Shadow File Formats</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="administrative-issues.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Custom Configuration and Administration Issues</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |