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?

9
$ shutdown -h now

or

$ telinit 0
| improve this answer | |
  • 1
    init and telinit do exactly the same when invoked by user. – user1686 Jan 26 '10 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 '15 at 5:50
8

Try poweroff .

| improve this answer | |
  • This was the only one that worked for me. – Christian Vielma Nov 15 '13 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 '15 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.

| improve this answer | |
  • 1
    You beat my answer by 29 secs :D – Bolek Tekielski Jan 26 '10 at 10:50
  • there is also "reboot" – Joe Internet Jan 26 '10 at 11:30
4

shutdown -h now

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.