What is the proper sudo terminal command to shutdown the computer gradually, saving everything, closing everything in the right order, and basically doing everything the computer needs to be doing to shutdown properly without any damage, in a safe manner just like you would shut down by clicking on the shutdown menu button with your mouse? I am asking for a command that shuts it down without any further actions, so the suggested gnome-session-quit --power-off
is not a fit here.
And please give me one command, not a bunch of variants. Or if you do give me multiple options, please explain in which way they are different from each other.
$ sudo shutdown -h now
will do it. If you do$ man shutdown
you can read right on the first line that "shutdown arranges for the system to be brought down in a safe way". – Daniel Jan 31 '15 at 00:13