Книга: Fedora™ Unleashed, 2008 edition

Shutting Down the System

Shutting Down the System

Use the shutdown command to shut down your system. The shutdown command has a number of different command-line options (such as shutting down at a predetermined time), but the fastest way to cleanly shut down Linux is to use the -h or halt option, followed by the word now or the numeral zero (0), like this:

# shutdown -h now

or

shutdown -h 0

To incorporate a timed shutdown and a pertinent message to all active users, use shut down's time and message options, like so:

shutdown -h 18:30 "System is going down for maintenance this evening"

This example shuts down your system and provides a warning to all active users 15 minutes before the shutdown (or reboot). Shutting down a running server can be considered drastic, especially if there are active users or exchanges of important data occurring (such as a backup in progress). One good approach is to warn users ahead of time. This can be done by editing the system Message of the Day (MOTD)motd file, which displays a message to users after login. To create your custom MOTD, use a text editor and change the contents of /etc/motd. You can also make downtimes part of a regular schedule, perhaps to coincide with security audits, software updates, or hardware maintenance.

You should shut down Fedora for only a few very specific reasons:

? You are not using the computer and want to conserve electrical power.

? You need to perform system maintenance that requires any or all system services to be stopped.

? You want to replace integral hardware.

TIP

Do not shut down your computer if you suspect that one or more intruders has infiltrated your system; instead, disconnect the machine from any or all networks and make a backup copy of your hard drives. You might want to also keep the machine running to examine the contents of memory and to examine system logs. See Chapter 14 and Chapter 30, "Securing Your Machines," for how to protect and monitor a network-connected system.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.090. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз