On Tue 03 Oct 2023 at 13:15:48 (+0000), Ottavio Caruso wrote: > Am 03/10/2023 um 11:47 schrieb Ottavio Caruso: > > Am 03/10/2023 um 10:43 schrieb Bret Busby: > > > Also, why do you not use, instead of the command that you specified, > > > shutdown -h > > > or, (if instead, wanted, for example, after doing a kernel update) > > > shutdown -r > > > ? > > > > Because all of these are just an alias to systemctl poweroff as > > per systemctl man page. > > Sorry I said alias, I mean link. > > $ ls -l `which shutdown` > lrwxrwxrwx 1 root root 14 Jun 18 15:55 /usr/sbin/shutdown -> /bin/systemctl > $ ls -l `which poweroff` > lrwxrwxrwx 1 root root 14 Jun 18 15:55 /usr/sbin/poweroff -> /bin/systemctl > $ ls -l `which halt` > lrwxrwxrwx 1 root root 14 Jun 18 15:55 /usr/sbin/halt -> /bin/systemctl
And observe that: $ ls -l /usr/sbin/reboot lrwxrwxrwx 1 root root 14 Jun 18 09:55 /usr/sbin/reboot -> /bin/systemctl $ but one of the first things systemctl will do is to find out by which name it was called, and act accordingly. That's pretty common behaviour in un*x (think busybox). Cheers, David.