I want to shutdown computer with my phone using KDE Connect. That can be easily done by adding a shutdown command in the setting of the Runcommand plugin within the KDE Connect program in Linux.
The idea is to close the applications gracefully without abruptly killing them and losing last configurations, for example.
I know about systemctl poweroff.
I read under this question that "shutdown -h now or shutdown -r now are graceful", and also that scripts involved may vary depending on the distribution. What is the situation in Ubuntu?
Are the commands above preferable to systemctl poweroff for my purpose?
