What is the difference between the shutdown menu item and shutdown -h now
?
The former sometimes hangs up my laptop on Ubuntu 11.10.
What is the difference between the shutdown menu item and shutdown -h now
?
The former sometimes hangs up my laptop on Ubuntu 11.10.
The shutdown menu item requests the graphical system to shutdown cleanly. Programs that have files to save, for example, have an opportunity to ask the user what to do.
shutdown -h now
(synonym:poweroff
; see alsoreboot
) merely sends signals to all running programs. They don't have a chance to query the user if they have unsaved files. However, sending thepoweroff
command will work in more situations because of this.The menu calls a complicated set of freedesktop.org specifications that shut down the system without the user needing to be root. You can see some of these on this answer. This method checks for open documents and blocking applications in the graphical interface before eventually calling for a system halt (via
shutdown
).Running
shutdown
directly just shuts the computer down - regardless of what's running.If the first isn't working, there's probably something blocking it. I'm not an expert in how it works so I suggest you file a bug on LaunchPad and let somebody who does know how it works step you through the debug process.
shutdown the system in a safe way. You can shutdown the machine immediately, or schedule a shutdown using 24 hour format.
After bringing down the system, shutdown command halts or reboots the system according to the option that is specified. Only root user can execute shutdown command