auto shutdown

anybody know a good utility to schedule a shutdown of the computer unattended at a specified time?

Doing things unattended on a fixed time in a Unix/Linux environment is typically something to be done via cron.

So first make a script that does what you want. An example:

#!/bin/bash
shutdown -h now

I personaly have a bit more elaborate script that tests if somebody is logged in or not, but that is up to what you exactly want.
Let us give the script a place and a name. As this is to be run by root, login as root and go to root’s bin directory:

henk@boven:~> su -
Passwd:
boven:~ # cd bin
boven:~/bin #

Use an editor (vim) to make the script (I will call it good-night).
Then make it executable by it’s owner (root):

chmod u+x good-night

Then edit root’s crontab with:

crontab -e

and add a line like:

0 23 * * *    /root/bin/good-night

which will run the script every day at 23:00.

a good utility is also kshutdown;)

Thanks - that’s the one I was after. I had used it in the past and couldn’t remember the name - as obvious as the name is. :slight_smile:

Found it in the community repos.