3

I just installed Ubuntu 14.04 on my Intel NUC DN2820. And almost every night as I lie down to sleep I listen to music, and my NUC shuts down (On Windows). On Windows it has the easiest command ever in CMD: Shutdown -s -t 1000.

That doesn't work on Ubuntu I figured out, but I found this command: Sudo shutdown 18:45, for those who don't know, 18:45 is an example when the system will shut down.

I tried this in terminal: Sudo shutdown 01:00 and I got a message in terminal '' E:/ can`t find the command'' The E: drive is my external drive, and C: is my SSD, what can I do to get it to shut down?

Thanks :)

2
  • you have two typo: 1) change Shutdown to shutdown and 2) change Sudo to sudo. note uppercase s Jan 28, 2015 at 9:16
  • Can you give me the exact command? :))
    – Swinzon
    Jan 28, 2015 at 9:39

2 Answers 2

3

The correct command would be sudo shutdown -h 23:45 - without the -h or -r switch it isn't a valid command (there are others - see man page).

Using +9 instead of the time gives you any easy way to say 'in 9 minutes'.

Any reference to E:/ tells us that there is some reference to a windows command going on here as linux has no E:/ which is partly why there are comments as to what you really typed, above - please copy/paste commands, don't re-type them!

10
  • Thanks! :D I`ll try when I get home :) So I can use sudo shutdown -h +9?
    – Swinzon
    Jan 28, 2015 at 9:51
  • yes - or any other time period (minutes) you fancy. now works as well. Jan 28, 2015 at 9:53
  • Okey, 'cus in Windows it's seconds. So correct me if wrong. I'll type this in terminal: sudo shutdown -h +20, than it'll shut down in 20 min?
    – Swinzon
    Jan 28, 2015 at 10:06
  • @Swinzon yes, exactly. You can find out more about shutdown by running man shutdown. For seconds, use -t, for example sudo shutdown -h -t 60 will shutdown in one minute. It is the same as running sudo shutdown -h +1.
    – terdon
    Jan 28, 2015 at 10:50
  • Oh, okay. I like to sleep to music :) Is there any command to get my machine to sleep? Or is it just shutdown?
    – Swinzon
    Jan 28, 2015 at 12:39
1

sudo shutdown -h +30 will let the system power off after 30 minutes.

Not the answer you're looking for? Browse other questions tagged .