Sample Header Ad - 728x90

is there a way to delay `systemctl reboot` using only `systemctl`?

0 votes
0 answers
2266 views
I understand that there is a multitude of options to shutdown or reboot a linux system. Normally I would just use shutdown with the appropriate option. However, I find myself having no control of the environment and needing to reboot the system using only systemctl but having to do so with a delay. Now systemctl supports poweroff und reboot which however in turn do not support delays afaik and as far as man is concerned. Is there a way to delay a systemctl reboot for x seconds without resorting to other commands like sleep 3 && systemctl reboot but just using systemctl? I could not find anything regarding a systemctl shutdown command, but understand that e.g. reboot invokes the shutdown (systemcall|command). man for systemctl, reboot, systemd-halt.service didn't list any delay parameter/configuration options. [original question was posed on reddit](https://www.reddit.com/r/linuxquestions/comments/okmihi/systemctl_poweroff_with_delay/) , but I it fit here better.
Asked by Fabian Schneider (101 rep)
Jul 15, 2021, 06:31 AM