0

I prefer getting things done using the keyboard instead of the mouse. In Gnome to shutdown the PC, I have to click several times to shutdown my PC.

I prefer to press Alt+F2 and type poweroff.

My question is: Do these two different methods perform the same actions and if not, what is the difference?

2

When I do ls -l /sbin/poweroff I can see that /sbin/poweroff is only a symbolic link to /bin/systemctl. So there should be no difference (at least on my system).

TIP: I would do it with Ctrl+Alt+Delete and then Enter as I find it easier.

  • This is personal preference, e.g. I've become so used to CrunchBang's default keybinding of Super+x that I've set this to invoke the shutdown dialog on every system I've used since. – Erathiel Mar 23 '16 at 12:02
  • It surely is a personal preference. – UncleAlbie Mar 23 '16 at 12:12
  • Just adding a bit of info to the answer - GNOME uses systemd as a system manager. So, it makes no difference which way you shutdown the machine. The end result is systemd is called to shutdown and it does whatever it has to, to shutdown gracefully. On SysVinit systems, there would be a difference and the preferred action should be shutting down from the GUI. – Munir Mar 23 '16 at 16:11
0

No they don't invoke the same actions, clicking the shutdown button will not insert the letters sh etc in the buffer that you get when pressing Alt+F2 or vice versa.

And although they will eventually most likely both call shutdown (8) to actually stop the machine, the commandline probably does fewer checks e.g. whether other users are logged in (on console windows e.g.)

  • GNOME uses systemd as a system manger. So, they will both invoke the same action of calling systemd to shutdown the machine. Systemd will do all the necessary checks while shutting down in both cases. Other than the letters being inserted in the buffer and shell history, the process will be exactly the same. – Munir Mar 23 '16 at 15:47
0

Using the gnome way is more friendly with the desktop, and able to ask running applications to properly shutdown themselves, and even suspend the shutdown if critical ones are running, like VirtualBox, while the poweroff way cannot but kill existing applications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.