+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 33
*nix Thread, How to shut down correctly? in Technical; Now I'm new to nix and only use it from a boot CD for imaging PC's, but how do I ...
  1. #1
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,876
    Thank Post
    295
    Thanked 120 Times in 101 Posts
    Rep Power
    40

    How to shut down correctly?

    Now I'm new to nix and only use it from a boot CD for imaging PC's, but how do I exit and powerdown nix correctly, instead of just exiting the desktop and just turning off the PC Thought I'd best learn how to do it correctly!

  2. #2

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,644
    Thank Post
    895
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    444
    enter shutdown now at a console prompt.
    To reboot you use shutdown -r now

  3. Thanks to ZeroHour from:

    TechSupp (2nd December 2009)

  4. #3
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    30
    shutdown -h now works as well. H imply halt.

    You can also specify timings as well with -t in seconds

    Shutdown -r -t 120 instead of now if you so wanted.

    Anywho.

    "man shutdown" and you'll get all available commands.

  5. Thanks to ahuxham from:

    TechSupp (2nd December 2009)

  6. #4
    apaton's Avatar
    Join Date
    Jun 2009
    Location
    Kings Norton
    Posts
    283
    Thank Post
    54
    Thanked 106 Times in 87 Posts
    Rep Power
    36
    I always use "init 0", but maybe that a bit old school.

  7. #5

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Missing the -h out of the shutdown command sometimes drops you into maintenance mode, which is scary - always include it to shut the machine down.

  8. #6
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,876
    Thank Post
    295
    Thanked 120 Times in 101 Posts
    Rep Power
    40
    Forgot all about the 'man' pages! Its been nearly 20 years since I really last worked on a Unix machine, a Sun Spark I think it was.

  9. #7

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,644
    Thank Post
    895
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    444
    I will be honest I have never used -h and not had issues.

  10. #8


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,688
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    I'm a simpleton, halt and reboot for me.

    Oh init 5 and init 6 if you're in Solaris land

  11. #9
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,337
    Thank Post
    83
    Thanked 388 Times in 258 Posts
    Rep Power
    111
    init 6 to reboot works on most *nix

    Shutdown -h -P -t now seems to work well

  12. #10

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    @ZeroHour: usually varies by distribution.

  13. #11

    Join Date
    Nov 2008
    Posts
    41
    Thank Post
    8
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by TechSupp View Post
    Now I'm new to nix and only use it from a boot CD for imaging PC's, but how do I exit and powerdown nix correctly, instead of just exiting the desktop and just turning off the PC Thought I'd best learn how to do it correctly!
    On Linux (most distros) "poweroff" and "reboot" work fine. But if you're booting from CD and haven't mounted any hard-disks, you can just switch off with impunity.

    --
    Simon

  14. #12
    TwoZeroAlpha's Avatar
    Join Date
    Nov 2008
    Location
    Colchester, Essex
    Posts
    470
    Thank Post
    69
    Thanked 65 Times in 52 Posts
    Rep Power
    35
    Assuming Ubuntu (or variant)

    sudo shutdown -P now

    works pretty well for me. Capital "P" is important as it's the poweroff flag. If you've got a desktop (therefore GUI?) is there not a simple poweroff/shutdown button?

  15. #13
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    30
    Quote Originally Posted by apaton View Post
    I always use "init 0", but maybe that a bit old school.
    Indeed not, the init methods are what I still use

  16. #14
    apaton's Avatar
    Join Date
    Jun 2009
    Location
    Kings Norton
    Posts
    283
    Thank Post
    54
    Thanked 106 Times in 87 Posts
    Rep Power
    36
    One never to use on a Sun Solaris box, unless in the lab.

    $ uadmin 2 0

    Fastest shutdown in the west!!! (Its not pretty, it just stops everything)

    Andy

  17. #15
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    427
    Thank Post
    68
    Thanked 90 Times in 75 Posts
    Rep Power
    61
    I always use init 0, works on any system.
    init 6 to reboot

    box

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Printers not mapping correctly???
    By actech in forum Windows Server 2000/2003
    Replies: 3
    Last Post: 19th June 2009, 11:57 AM
  2. [CLOSED] Bug/Error: Signature not displaying correctly
    By kearton in forum EduGeek.net Site Problems
    Replies: 2
    Last Post: 9th January 2008, 09:20 AM
  3. Replies: 6
    Last Post: 19th October 2007, 02:48 PM
  4. Room not following policies correctly
    By localzuk in forum Windows
    Replies: 21
    Last Post: 22nd January 2007, 04:33 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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