I am done using my laptop but I am using the hotspot in my smart phone. So I want my laptop to be awake for next one hour. How can I Shutdown the laptop after one hour of time?
Asked
Active
Viewed 3.5e+01k times
1 Answers
248
Scheduling a shutdown
To shutdown run the command:
sudo shutdown -P +60
That will wait 60 mins before starting the shutdown sequence.
You could do:
sudo shutdown -P 1:00
to shutdown at 1 AM and
sudo shutdown -P now
to shutdown now.
A message is broadcast to all terminals to warn about the shutdown.
Cancel a pending shutdown
After, starting a shutdown, if the time argument is not "+0" or "now", you can use:
sudo shutdown -c
to cancel the scheduled shutdown.
-
2is there any way to exit the shutdown program. When I press `ctrl + c` after executing shutdown, it also aborts the scheduled shutdown. – Mark Evans Jun 28 '16 at 18:37
-
1Just press Ctrl+Z, which will allow any command to run in the background – Cosine Mar 01 '17 at 04:16
-
what is mean by -p? – Prashant Tapase May 25 '17 at 13:16
-
@PrashantTapase power off fully – Tim May 25 '17 at 13:18
-
Does this command override any programs that might be running at the time? – Josh Jan 19 '20 at 20:00
-
1@Josh I believe so. – Tim Jan 19 '20 at 20:01
-
is there anywhere a pretty gui? maybe qshutdown ? – SL5net Sep 24 '20 at 17:38