What is the difference between the shutdown, halt and reboot commands?

12

5

Should I be using one or the other for different things?

loosecannon

Posted 2011-01-23T22:49:39.220

Reputation: 275

man halt covers the differences – RobotHumans – 2011-01-23T22:58:39.787

have read it, just wanted clairification – loosecannon – 2011-01-26T03:42:52.027

Answers

14

halt brings the system down to its lowest state, but leaves it powered on.

shutdown brings the system down to its lowest state, and will turn off power (soft power switch) if it can. Most computers now can do so.

reboot restarts the system. It brings the system down to its lowest state, then starts it up again.

Which to do depends on what you want to do. halt is usually to get to a state where you can perform low level maintenance. shutdown is to power the system off, and reboot is to reboot it.

Rich Homolka

Posted 2011-01-23T22:49:39.220

Reputation: 27 121

@loosecanon - ask your question in a separate question. :-) There is actually an issue with what you suggest, and could cause data loss. – Greenonline – 2015-07-27T14:57:48.690

2Whenever I use the halt command on Mac OS X and Linux, it completely shuts my system down. – Wuffers – 2011-01-24T00:15:32.937

6This is slightly incorrect. shutdown can bring the system to any of these states, including single user mode (the default). Also, there is the poweroff command, turning power off (if possible). – maxelost – 2011-01-24T16:45:43.167

2yeah halt also completely turns my computer off ( Ubuntu server 9.04) but I normally just type halt to poweroff and reboot to restart because its shorter than the shutdown command. Any harm in that? – loosecannon – 2011-01-26T03:40:07.787