How to turn off your computer, later!
James is 15 and he’s having his first experiences with Linux. He’s just started to download a new distro from BitTorrent bit hey, it’s 8.13 am and he is supposed to be at school by 8.30… Has he to turn off the computer before going to school? Try to ask his mother! But he wants to try the new distro as he come back, what can he do in order to finish his download AND turn the computer off as it finish? Suppose his client doesn’t allow him to.
sleep 30m && poweroff -n
How cool is that? You tell “sleep 30 minutes then just poweroff!”
It isn’t the only way, try to do “man shutdown” to see more info.
For who is concerned about

Remember that:
nigma@nigma-desktop:~$ sudo whoami && sleep 1 && whoami
[sudo] password for nigma:
root
nigma
nigma@nigma-desktop:~$
so you need to be root before doing these things, but this time for real:
nigma@nigma-desktop:~$ sudo su
root@nigma-desktop:/home/nigma# whoami
root
It’s a nice way to make your computer do something after a little bit, and it’s quick to type.
return `whoami`
Tags: commandline, linux