Sometimes I would like to shut down in a hurry. By hurry I mean 5 to 10 seconds. Assume I can run any script with root privileges in tty which I've prepared beforehand, and after 5 or 10 seconds the power will go out. What's the best way to minimize the damage (like maybe unmounting all devices, or closing all open files)?
Anyway you can shutdown from terminal using the command,
Afterwards you need to put your sudo password. Here is an answer describes how you can shutdown from terminal without entering password. To do so,
This allows you to run the above commands, using
If you want a step further ahead you can make a alias named
That would enable you to shutdown the system by only running
|show 9 more comments|
Alt+Print Screen+R,E,I,S,U. Then Power Button to shut down.
Will quickly and safely shut down a computer running Linux (Ubuntu). It is talking directly to the kernel, and can be used at anytime.
This is a modified version of REISUB. Since we don't want a restart, B is replaced with just shutting the computer down.
|show 7 more comments|