Schedule pc shutdown

If for whatever reason  you need to shutdown the pc after x hours you can use an easy command to do so.

To shutdown the computer at a fixed hour, lets say 23:15, use this command in the terminal:

sudo shutdown 23:15

To shutdown the system after x minutes, lets say 30, use this command in the terminal:

sudo shutdown +30

extra options:

add -r at the end of the command if you want the system to be rebooted instead of shutdown, it would look something like this:

sudo shutdown 23:15 -r

To cancel the shutdown command use this:

sudo shutdown -c

notes:

1. set a shortcut for the terminal (I use f12) using “system -> preferences -> keyboard shortcuts

2. use the command “man shutdown” to learn about the other options

3. the word “sudo” means that this command will be executed a root, thus you’ll need the administrator password if you want to use it.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: