Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any command by which I may shutdown my system instantly?

share|improve this question

migrated from stackoverflow.com Feb 14 '10 at 11:52

This question came from our site for professional and enthusiast programmers.

23  
Flipping the power switch at the wall. –  Sam152 Feb 14 '10 at 11:51
    
Sam152: One and done. –  Urda Feb 14 '10 at 19:56
2  
@Sam152: sudo flipping the power switch at the wall. ;) –  Bobby Feb 16 '10 at 9:18
add comment

6 Answers 6

sudo shutdown -h now
share|improve this answer
    
That wouldn't shutdown a system instantly. ;) –  Marcel Korpel Feb 14 '10 at 11:57
9  
@Marcel Korpel: As instantly as one should do without damaging his system ;) –  Felix Feb 14 '10 at 12:05
    
@Felix - I keep hearing that Linux is a very robust system, and it can't handle the same "hard reboots" as my Windows endured? Would be surprising ;) –  Gnoupi Feb 16 '10 at 9:57
1  
@Gnoupi: No OS can be built without some vulnerability to abrupt shutdown. Otherwise, the answer to the fastest shutdown method would be to yank the power cord. –  harrymc Feb 16 '10 at 11:03
1  
Some versions the syntax is different. "sudo shutdown -g0 -y -i5" (Solaris). And of course, just to make it difficult, the exact value following "i" can be different for shutdown on different systems. I believe it's 0 on a lot of other systems for shutdown. Sigh. Gotta love standards, so many to choose from! –  Brian Knoblauch Feb 16 '10 at 13:34
show 1 more comment

You've got to use the Magic SysRq key combination REISUB.

Repeat after me: "Raising Elephants Is So Utterly Boring..."

share|improve this answer
1  
No. REISUB will restart it. REISUO will shutdown. Or simply O. –  Benoit Nov 22 '10 at 20:19
add comment

Hold the power key for about 4 seconds, it's quite fast.

share|improve this answer
    
If doing so, flipping the power switch is actually faster ;) –  Gnoupi Feb 16 '10 at 9:58
    
That's the same as any other shutdown method, assuming that the OS does power management. –  harrymc Feb 16 '10 at 11:04
1  
If you actually can't wait a few seconds, and are going to kill power, use a journaling filesystem like ext3/ext4 so you don't lose as much data due to unwritten writes. –  CarlF Feb 16 '10 at 11:33
add comment
poweroff

This should work on most common distros. Unlike with shutdown, on many systems you can execute this as a normal user (no sudo needed).

Edit: Further reading:

share|improve this answer
add comment

On certain linux distributions, shutdown offers the option -n. (See man shutdown). Certain distributions (such as ubuntu which makes use of upstart instead of sysvinit) don't support his flag however, and this flags is (as can be learned from the manpage) not without risk. Though I've been using this for years (on my laptop i don't care that all daemons are terminated properly, it just want everything killed and my diskcache flushed) (it is faster than a regular shutdown, and more safe than pulling the plug (and friends ) ). You could see if this solves your problem.

share|improve this answer
add comment

halt is pretty quick.

share|improve this answer
    
On some systems it's known as "haltsys" rather than just "halt". –  Brian Knoblauch Feb 16 '10 at 13:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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