I would like to do that using the command-line, because sometimes my computer freezes and I need to force a shutdown (I know it's not good to the hardware). And: What is the difference between Halt and Shutdown commands?
|
Using the commands |
|||||
|
|
If you can still access a text mode console, or if you can log in remotely:
If absolutely everything is hosed, but you have console access, you can use magic SysRq to at least flush all file changes to disk unmount filesystems cleanly. Press
(Note: you'll sometimes see “REISUB”, but the R and I steps are useless.) |
|||||
|
|
If it is a frozen X session, hit ctrl+alt+f1 to get to a console. Log in and from there, execute You may also be able to kill the offending process. Run |
||||
|
|
If your BIOS is setup in a way where you have to press the power-button more than X seconds to actually turn off the machine, press the power-button once. This will give the acpi-signal for shutdown/halt/poweroff. |
|||
|
|