Results 1 to 7 of 7

Thread: How Do I Shut Down Linux with a Command Line

  1. #1
    Join Date
    Apr 2013
    Beans
    262

    How Do I Shut Down Linux with a Command Line

    Hello All,
    What is a command line that I can shut down Linux/computer, with out having to get to the top right and shut down normally?
    Thanks

  2. #2
    ibjsb4 is offline Ubuntu addict and loving it
    Join Date
    Sep 2012
    Beans
    4,987

    Re: How Do I Shut Down Linux with a Command Line

    Looks like the first link has the answer.

    http://www.googlubuntu.com/results/?...ch&cof=FORID:9

  3. #3
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: How Do I Shut Down Linux with a Command Line

    Code:
    sudo shutdown -h now
    Code:
    man shutdown
    for more info.

  4. #4
    Join Date
    Apr 2013
    Beans
    262

    Re: How Do I Shut Down Linux with a Command Line

    Thank you everybody...dont know why 13.04 just decides to hang-up on me and stop working, with no apparent reason
    Last edited by GUZZLR; October 16th, 2013 at 01:56 AM.

  5. #5
    Join Date
    Aug 2013
    Beans
    3

    Re: How Do I Shut Down Linux with a Command Line

    Quote Originally Posted by GUZZLR View Post
    Hello All,
    What is a command line that I can shut down Linux/computer, with out having to get to the top right and shut down normally?
    Thanks
    Code:
    init 0
    And to reboot:
    Code:
    init 6

  6. #6
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,958
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How Do I Shut Down Linux with a Command Line

    init 0 and init 6 (which have to be run with sudo) are a hold over for sysV init scripts correct? I believe they still work in Ubuntu, however I don't think they are going to work on other distro's that use Systemd like arch and Fedora or android for that matter. Yes I know this is probably more information than you wanted to know, however there are other methods out there -- here's a reference for a broad overview: https://www.linux.com/learn/tutorial...tro-to-systemd. Really what you need to know is that successor to system V init scripts are either upstart (which was written solely by Ubuntu developers) and systemd which was written by Leonard Poettering (Fedora). I don't remember the story, but there was a falling out between Poettering and the Ubuntu developers -- some say it was do to copyright policies that Ubuntu imposes on its developers when contributing to upstart, some say it involves other things as well. Poettering and others wrote systemd as an advancement "as he would call it" or alternative to upstart. Needless to say Ubuntu remains with upstart, whereas many other distributions have moved onto systemd. Ubuntu at the present time looks like it will never move to systemd, however who knows what the future will bring.

  7. #7
    Join Date
    Aug 2009
    Location
    Makati City, Philippines
    Beans
    2,269
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How Do I Shut Down Linux with a Command Line

    Shutdown ubuntu using command line?

    sudo poweroff --> poweroff
    sudo reboot --> reboot

    Simple enough.

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
  •