Is there any command / program by which I may shutdown my system instantly?
Update: Thank you to those who have suggested to turn off using the power socket. :D
migrated from stackoverflow.com Feb 14 '10 at 11:52
This question came from our site for professional and enthusiast programmers.
Repeat after me: "Raising Elephants Is So Utterly Boring..."
This should work on most common distros. Unlike with
Edit: Further reading:
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.
Taken from another SE site:
Alt + SysRq + B is instant reboot, and Alt + SysRq + O is instant shutdown.
I don't suggest to do the following if you are not forced by really special reasons:
It is rough, brutal and it can be considered a close equivalent of unplugging the power chord...
Some words more, aka The story, Chapter I
The whole Linux depends from the loving care of init  . Nonetheless and not without a certain amount of ungratefulness, there was a time in which the good Lord root user can betray this love and suddenly
Then some wizards made a charm to protect init (from the Book of
(Our spies report [U1] that init will hanle 1 HUP 6 ABRT 11 SEGV 15 TERM 30 PWR 2 INT 10 USR1 14 ALRM 17 CHLD 32)
It works because init is the first process to run and takes the PID number 1 [2b].
This is unsafe, unwise and you feel it is herald of bad omen and a curse but if you cannot materially put the hands on and unplug it...
The curse: it will not write on the log, it will not kill all the processes & wait for their ending, it will not write on the HDD properly updating the inodes neither ti will unmount the filesystems; don't even mind it will save the options of the graphical windows and the shell histories, and many other beyond our imagination... as we said a close equivalent of unplugging the power chord, or the battery if a laptop.
The correct way
Some words more, aka The story, Chapter II
Indeed, nowadays, we do not trust any more in the existence of the three Moirai  of the Linux world,
Now that all seemed to be clear and cosy for all, rumours claim  that in the underworld of systemd toolset  a revolution was performed leaving unaware the whole overworld. Thanks to an army of backwards compatibility shims we didn't notice at all that reboot, poweroff, halt  and even telinit  and shutdown  are all already bounded to the new king systemctl . Please listen the whole story from the original voice of JdeBP The Bard  because I have no more breath.
If you are a followers of the Ubuntu cult you may still remain aware for a while of all those claims .
The middle Earth of
That you are under systemd or not you should be able to stop the computer without invoking all the correct shudown procedures (and so more fast):
Ps> Take inspiration about variants from the tail JdeBP The Bard .