If I want to shutdown my system in 30 minutes with telinit, how could I do it? I know that with shutdown is easier but just for knowing it.
If I want to shutdown my system in 30 minutes with telinit, how could I do it? I know that with shutdown is easier but just for knowing it.
Using
at
:Or use
sleep 30m; telinit 0
.telinit
itself cannot do this. You will have to use other tools in combination.at
andsleep
both allow you to cancel the operation (withatrm
forat
and CtrlC for the other).Extra in case someone wonders about rebooting:
To execute something in the future we have the "at" command. That would be:
or sleep:
(1800 seconds)
As a suggestion, not addressing to your question directly. Even
at
command is not installed by default andsleep
with telinit is a great chioce: If you want to try another tool other than telinit, you could try reboot with at: