According to this post menu shutdown asks each application to save their work prior to shutting down. Will something more serious happen if one always uses sudo shutdown -h now
to turn off the machine? It works so fast, I am getting hang of it.
2 Answers
None that I am aware of. That is how I shut down all of my servers. Using the -q options would force a non-graceful shutdown, but the -h option is fine. The 'now' part of the command is the 'time' to shutdown.
syntax:
shutdown [-a][-t sec][-krhnfFc][time][warning-message]
shutdown -h -t 10
specified a shutdown in 10 seconds.
shutdown -h 8:00
shutdown happens at 8 o'clock
As long as there are no applications which require manual shutdown steps (or you always perform any manual steps) and there are no users who might have files open (say in vi or openoffice) who might have the rug pulled out from underneath them. Of course those are primarily concerns for a server. If the system is used by you alone, then no worries.
sudo poweroff
, but I think they're the same thing. If you don't you a force option (-f or equivalent), there's no problem. The program probably halts/kills all your processes/programs gracefully at the beginning. If you didn't save your work (e.g. an open document edited in libreoffice), you might lose your unsaved work.