Библиотека сайта rus-linux.net
To shut down the system from a terminal session, sign in or
"su" to the "root" account. Then type
/sbin/shutdown -r now''. 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
to shut down. Please be patient as it may take a couple of minutes for
Linux to terminate.
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
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
/sbin/shutdown -h now'' when signed into or
"su"ed to the "root" account. Linux will shut
itself down then display a message, "System halted". At
this point you can power down the computer.
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).
Upon system bootup, Linux will start automatically, and load all necessary services including networking support, and Internet services.
Tip: 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 "now" keyword. You can also customize the shutdown warning message. For example, ``
/sbin/shutdown -r +5 Hardware upgrade'' 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.