Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Alternative to the shutdown command?

  1. #1
    Join Date
    Oct 2013
    Beans
    12

    Alternative to the shutdown command?

    I was screwing around in terminal and wanted to see about turning my computer off before I went to bed, I typed in shutdown as a guess and to my surprise it was actually a command. It then asked for a time (in minutes as I found out) and for root user (so I used sudo) so the final command I sent was sudo shutdown 1, which then sent out a message saying there was one minute until the server would go down for maintenance. So it looked as though things were shutting down as they would in a normal situation, except that the power button on the front of my computer was still glowing green and the monitor did not have the idling orange glow on the power button it normally has when the computer is off. Is this because shutdown is an alternative command to something that turns everything off? Furthermore are there other alternative commands for things such as restarting and shutting down that I can use and have them enact instantaneously?

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    6,575
    Distro
    Ubuntu

    Re: Is there an alternative to the shutdown command?

    Code:
    sudo reboot
    will restart the system.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Sep 2013
    Beans
    6

    Re: Is there an alternative to the shutdown command?

    Normally shutdown does turn of your computer completely (at least with mine it does), but mabe someone else has more details on that.
    To turn your computer off immediately try "shutdown now", to reboot try "shutdown -r now" (both require root privileges).

  4. #4
    Join Date
    Oct 2013
    Beans
    12

    Re: Is there an alternative to the shutdown command?

    Quote Originally Posted by UlTroX2000 View Post
    Normally shutdown does turn of your computer completely (at least with mine it does), but mabe someone else has more details on that.
    To turn your computer off immediately try "shutdown now", to reboot try "shutdown -r now" (both require root privileges).
    Ok. For the sake of learning syntax do you know what -r now applies to? Im slowly trying to develop an understanding of the terminal, im getting the commands but finding things on syntax of commands seems to be harder.

  5. #5
    Join Date
    Feb 2008
    Location
    Funky Town, AUS
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Is there an alternative to the shutdown command?

    This:

    https://help.ubuntu.com/community/Us...minal#Commands

    ... and this:

    https://help.ubuntu.com/community/Co...Command_Syntax

    ... might help. There is a ton of info available about commands and syntax.

    PS: This is also handy but no explanations. You could research each.

    http://fosswire.com/post/commands/

    Another:

    http://beginlinux.com/desktop_traini...terminal-guide

    Incidentally, type this:
    Code:
    man shutdown
    ... in a terminal and you will find, first on the list:

    -r ... Requests that the system be rebooted after it has been brought down.
    '-r' is an option (there's a heap and they can do different things in different situations) and they come after a command. You can also string them together.

    Just a note: I have never heard of this timing thing with shutdown you mention. I just tried it and get nothing like it. Hmm. You learn something everyday, hopefully.
    Last edited by Bucky Ball; October 7th, 2013 at 07:42 AM.

  6. #6
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Is there an alternative to the shutdown command?

    Shutdown command, on it's own, only shuts the system down. If you want it to also power off, you need to use the "-p" option.

    ...or save yourself some typing, and instead of "sudo shutdown -p now" just use "sudo poweroff". ("poweroff", "halt" and "reboot" commands invoke shutdown with different options. They might be easier to remember and quicker to type if you don't need to specify a time or shutdown message...)
    Last edited by mcduck; October 7th, 2013 at 09:29 AM.

  7. #7
    Join Date
    Sep 2006
    Beans
    8,623
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Is there an alternative to the shutdown command?

    Quote Originally Posted by mcduck View Post
    Shutdown command, on it's own, only shuts the system down. If you want it to also power off, you need to use the "-p" option
    I use shutdown -h on my systems, which is probably just calling for the system to be powered off. AFAIK on Ubuntu there is no -p option. Though there is a -P for powering down.

    Code:
    sudo shutdown -h 23:59 "Time to go to bed" &

  8. #8
    Join Date
    Apr 2011
    Location
    3rd Rock from the Sun
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Is there an alternative to the shutdown command?

    Even I use sudo shutdown -h 02:15 and it does 'Power Downs' my computer.
    "Evolution is Nature's way of issuing upgrades."


  9. #9
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Is there an alternative to the shutdown command?

    Although I knew about 'shutdown', I didn't know it could also poweroff the computer.

    I've always used:

    Code:
    sudo halt
    or

    Code:
    sudo reboot
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  10. #10
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Is there an alternative to the shutdown command?

    -h option might or might not actually power off the machine, depends on the power management (and BIOS settings) of the system.

    Indeed, it does power off most of the systems I've used, but not all of them, so poweroff (or the -P) option is more universal solution.

    (And yes, my bad, it's -P not -p. I usually just use "halt" as it's the shortest one and does power off my laptop)

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •