5

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?

0

4 Answers 4

9
$ shutdown -h now

or

$ telinit 0
2
  • 1
    init and telinit do exactly the same when invoked by user. Jan 26, 2010 at 14:32
  • As I just noted on another answer: On Red Hat, the 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...
    – Matt
    Apr 27, 2015 at 5:50
8

Try poweroff .

2
  • This was the only one that worked for me. Nov 15, 2013 at 1:27
  • @ChristianVielma and others: The 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.
    – Matt
    Apr 27, 2015 at 5:49
6

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.

2
  • 1
    You beat my answer by 29 secs :D
    – Bolek Tekielski
    Jan 26, 2010 at 10:50
  • there is also "reboot" Jan 26, 2010 at 11:30
4

shutdown -h now

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .