Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
Hey ppl I just found out that system can be shutdowned by shutdown -h now command and was wondering the difference between the it and poweroff and also can any ...
  1. #1
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    difference between poweroff and shutdown -h now

    Hey ppl
    I just found out that system can be shutdowned by shutdown -h now command and was wondering the difference between the it and poweroff and also can any one tell me how to pass a message in the shutdown command.
    thanks for your replies.

  2. #2
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    y can only root use shutdown

    this is confusing me , y can't a normal user use the shutdown command ???

  3. #3
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    opps

    also how can i get to view the source code of shutdown as vi command can't open shutdown script( it opens but it's in unreadable format)

  4. #4
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,093
    Quote Originally Posted by vickey_20 View Post
    this is confusing me , y can't a normal user use the shutdown command ???
    Allowing a normal user to shutdown a Unix machine would be considered a security issue. Normal users can shutdown if you set them up to do so with the sudo command.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  5. #5
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Switch off power to shutdown is not a good idea ... it is better to go through a controlled shutdown which will write disk cache and unmount file systems.

    A normal user is unable to shutdown a system without being given rights to do so (use sudo to do this) ... allowing a normal user logged on remotely to shutdown a server makes little sense.

    If you are running a graphical login manager like kdm then there is normally an option to allow shutdown of system (assuming you have a desktop or laptop system) ... what distro are you using?

  6. #6
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    I am using red hat 5
    I guess i understood the use( plz correct me If I am wrong)
    shutdown - is for shutting down the server
    poweroff- is for shutting down the client

  7. #7
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by Jonathan183 View Post
    A normal user is unable to shutdown a system without being given rights to do so (use sudo to do this) ... allowing a normal user logged on remotely to shutdown a server makes little sense.

    If you are running a graphical login manager like kdm then there is normally an option to allow shutdown of system (assuming you have a desktop or laptop system) ... what distro are you using?
    Whats difference does it make to security if I can shutdown/reboot from graphical menu but cannot use the shutdown command from terminal on the same system?

    Also, is there a difference between shutdown and halt? Coz, in FreeBSD when I tried
    Code:
    shutdown -h now
    It says system halted. Enter reboot to restart the system. It stays in the root prompt.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  8. #8
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by vickey_20 View Post
    shutdown - is for shutting down the server
    poweroff- is for shutting down the client
    No, there is no such distinction.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  9. #9
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Sorry I had misunderstood the question ...
    but man shutdown and man poweroff show differences
    from man pages
    shutdown brings the system down in a secure way.
    and from halt man page
    -f Force halt or reboot, don't call shutdown(.
    I always use shutdown ...

    Allowing any user to execute shutdown, poweroff or halt would cause problems ... I think kdm limits shutdown option to local users only, and regular users are unable to start kdm.

  10. #10
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    Quote Originally Posted by saivin View Post
    No, there is no such distinction.
    Then are they both same!!!
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

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
  •  
...