I want to know the exact command to shut down a Red Hat linux server.
I was using init 0
, but some one said it's not the proper method to shut down my linux server.
If not, what command should I use?
$ shutdown -h now
or
$ telinit 0
shutdown
command may be in /sbin/shutdown
, which (at least on the Red Hat machine I just shut down) may not be in the default path, so you might have to invoke the full path to the command, as opposed to just shutdown
. Your mileage may vary, depending on your exact install details...
Try poweroff
.
shutdown
command may be in /sbin/shutdown
, which (at least on the Red Hat machine I just shut down) may not be in the default path, so you might have to invoke the full path to the command, as opposed to just shutdown
. Will also add this note onto the top-rated answer.
To reboot from the prompt, type:
$ shutdown -r now
Or, if you want to exit from your system and turn off your machine, type:
$ shutdown -h now
.. via manuals.