Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
i dont know whats wrong but i cant run the shutdown command. is there a reason i cant. Code: shutdown -r now this should restart my system but it wont ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901

    shutdown command


    i dont know whats wrong but i cant run the shutdown command. is there a reason i cant.

    Code:
    shutdown -r now
    this should restart my system but it wont work is it cause im logged in as a user but that shouldnt matter. i wouldnt think. can anyone help
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  2. #2
    Linux Engineer kriss's Avatar
    Join Date
    Jun 2003
    Posts
    1,113
    Maybe you dont have /sbin (where shutdown normaly is) in your PATH?
    Besides, I think you have to be root to do it...

  3. #3
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    If you can do it as root then the difference is most likely in the user profile since any typical user should have file rights for but your user doesn't have the correct default paths.

    Also if you try from a terminal window a "su -" and try it again does it work?
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    ok i logged out of user and into root and ran the command and it worked but if i log in under user and "su" i still cant. but i dont know im sure there is some setting i can do that will make anyone shutdown i jst need to find it. thanks for the help guys
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  6. #5
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    Did you "su" or "su -" ? "su -" get you root rights and profile where "su" only gets you root rights.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  7. #6
    Linux Engineer big_k105's Avatar
    Join Date
    May 2003
    Location
    Fargo, ND
    Posts
    901
    well you learn something new everyday. i didnt know it made a difference. but i know no for future reference
    BIG K aka Kyle
    Programming Forums
    www.kylekonline.com
    Please don\'t PM me for help-- ask in the forums instead!

  8. #7
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    i think all the su - command does is read the ~/.profile & ~/.bashrc files upon username change.

    as a user, try running /sbin/shutdown -r now , just to see if it is a PATH issue. if that does not work, then you may always need to be root?

    Jason

  9. #8
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    I always use halt to shutdown my linux box.

  10. #9
    Linux User
    Join Date
    Jun 2003
    Location
    Calgary, AB CANADA
    Posts
    496
    I always use su -- (two minus signs). What's the diff between using one and using two?
    \"Everything should be made as simple as possible, but not simpler.\"
    Albert Einstein

  11. #10
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    I dont know CT. I checked the man page (man su), and it only mentioned using one minus sign.

    Jason

Page 1 of 2 1 2 LastLast

Posting Permissions

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