As others have said, the command line commands sudo reboot
and sudo halt
, will always reboot or shutdown the computer without asking any questions. Those commands will send all running programs a TERMinate signal and shortly afterwards KILL any process, which did not already quit. This means that you will loose unsaved work (as if all programs crashed.) Therefore, you should only use sudo reboot
after closing anything you care about. (Even if you have saved your work, applications are likely to have not yet updated their configuration files.)
The GUI shutdown command works differently by design. I does various checks prior to the actual shutdown:
- Is any other user logged in?
- Are any (GUI) applications running? (If yes, tell them to save all data and quit)
Only if the answers to the questions above is No, it will continue like sudo reboot
. An application, which is busy (with saving or something else), is never forcibly stopped, unless you confirm to reboot anyway.
In your case, there appears to be a strange application still running. Ubuntu doesn't know its name ('Unknown') and the application does not responded to the "Quit+Save, because the user wants to reboot"-command. This should never happen, and as a safety measure, Ubuntu will not reboot.