+ 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,351
    Thank Post
    239
    Thanked 82 Times in 65 Posts
    Rep Power
    26

    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. IDG Tech News

  3. #2

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Scotland
    Posts
    5,677
    Blog Entries
    1
    Thank Post
    681
    Thanked 1,017 Times in 591 Posts
    Rep Power
    264
    enter shutdown now at a console prompt.
    To reboot you use shutdown -r now

  4. Thanks to ZeroHour from:

    TechSupp (2nd December 2009)

  5. #3
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    24
    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.

  6. Thanks to ahuxham from:

    TechSupp (2nd December 2009)

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

  8. #5

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 774 Times in 647 Posts
    Rep Power
    168
    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.

  9. #6
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,351
    Thank Post
    239
    Thanked 82 Times in 65 Posts
    Rep Power
    26
    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.

  10. #7

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Scotland
    Posts
    5,677
    Blog Entries
    1
    Thank Post
    681
    Thanked 1,017 Times in 591 Posts
    Rep Power
    264
    I will be honest I have never used -h and not had issues.

  11. #8


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,431
    Thank Post
    327
    Thanked 726 Times in 654 Posts
    Rep Power
    201
    I'm a simpleton, halt and reboot for me.

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

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

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

  13. #10

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 774 Times in 647 Posts
    Rep Power
    168
    @ZeroHour: usually varies by distribution.

  14. #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

  15. #12
    TwoZeroAlpha's Avatar
    Join Date
    Nov 2008
    Location
    Colchester, Essex
    Posts
    432
    Thank Post
    63
    Thanked 51 Times in 45 Posts
    Rep Power
    28
    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?

  16. #13
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    24
    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

  17. #14
    apaton's Avatar
    Join Date
    Jun 2009
    Location
    Kings Norton
    Posts
    281
    Thank Post
    53
    Thanked 106 Times in 87 Posts
    Rep Power
    31
    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

  18. #15
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    338
    Thank Post
    52
    Thanked 68 Times in 56 Posts
    Rep Power
    22
    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, 10: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, 05: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
  •