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.