0

I have edited my .bash_aliases to contain the following line

alias shutdown='sudo shutdown -h now'

but when I try to run the alias it gives this error message

shutdown: illegal time value
Try `shutdown --help' for more information.

It seems like all my aliases containing the shutdown-command is giving this error message.

Any ideas?

  • 1
    Strange, it works for me – January Sep 11 '13 at 8:59
  • Maybe you just need to logout and back on to reload your profile changes? – Bruno Pereira Sep 11 '13 at 9:21
  • 1
    i agree with Bruno Pereira and look here: howtogeek.com/73768/… – fecub Sep 11 '13 at 9:45
0

It works with previous versions. (I can clearly remember I have done this before) However, in newer versions of Ubuntu (say 13.10), "now" is no longer a legal value. We should use "0" instead. So now your alias becomes:

alias shutdown='sudo shutdown -h 0'

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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