I know that I can shutdown my Windows computer with comments.

Is this possible on the raspberry pi? I am using Raspbian "Wheezy"

  • 1
    you have a lot of open questions.If you are satisfied with answers,accept them.It helps the website stats. – SteveIrwin Apr 7 '13 at 0:35
  • @steve I accepted a few. – xxmbabanexx Apr 7 '13 at 4:58

Take a look at man shutdown. There it says:

/sbin/shutdown [-akrhPHfFnc] [-t sec] time [warning message]

So when you are using shutdown you can send out a warning message:

sudo shutdown -h 12:30 'System will go down due to rainy weather.'

It will also print the number of minutes until shutdown. This should be sent to all users logged into some console.

  • Maybe OP would like to log reason for shutting down, instead of notifying logged users? – avra Apr 9 '13 at 7:18
  • Then man logger will be to the rescue. logger can be run before the shutdown to log arbitrary stuff. – Arne Apr 9 '13 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.