I am learning Linux system administration and I noticed that if I do
sudo systemctl poweroff
on my Ubuntu Xenial, it carries out the command far faster than it would if I did the same using the shutdown button from the GUI.
From the little I have done with Linux, this seems to be the case with most commands.
My understanding (I could be wrong being a system admin in the making) is that the off button also calls the systemctl poweroff
command. This I inferred from the way the apt
tool works as it calls the underlying dpkg
when running a task.
I would think the time difference shouldn't be very noticeable but it is.
As far as I know...
This kills all processes instantly, whereas pressing the
poweroff button
in the UI first checks if all GUI windows/processes are ready to be shut down (e.g.: if a text editor hasn't saved, ...). After that it kills the desktop environment (window manager, x server, and so on...).