Ubuntu – Shut down terminal sudo command

command lineshutdownsudo

I would like to know which 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.

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.

Thank you for the upcoming support!

Best Answer

Clicking on the shutdown button with your mouse is equivalent to calling gnome-session-quit:

gnome-session-quit --power-off
Related Question