Results 1 to 5 of 5
  1. #1

    * shutdown -r now OR service httpd restart? Difference?

    Hey guys what's the difference between this 3 command?
    shutdown -r now
    service httpd restart

    Under which situation should I use any of these?
    If I simple want to (1)clear apache processes and load which should I use and (2)clear caches, session, cookies etc which should I use?


  2. #2
    Join Date
    Feb 2007
    I'm not 100% sure but my understanding is...

    shutdown -r now = Forceful reboot (fastest)
    /usr/bin/reboot = Graceful reboot (safest)
    service httpd restart = Stops and starts the HTTPD service (ie. Apache) but no other services (this is not considered a server reboot and you can restart any service like this).

    Rarely would you want to shutdown -r or reboot your server, service ... restart is the fastest and most effective way to clear up an issue with a specific service.
    -Joe @ Secure Dragon LLC.
    + OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
    + Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas

  3. #3
    shutdown is a more secure way of rebooting where it terminates all processes and informs all logged in users about the halt.

    Unless the system is in runlevel 0 or 6 , the 'reboot' command invokes 'shutdown' itself.

    Service httpd restart is not related to the other two as it just restarts apache. Other services can be restarted in the same way too.

    As Jweb2 mentioned, service restart is the most effective way to clear up an issue with a particular service.

    So, in order to "clear apache processes and load" , you can just restart httpd.

    A reboot is only used as a last resort in any case.

  4. #4
    Thanks alot

  5. #5
    You are welcome!

Similar Threads

  1. pc restart after shutdown`
    By aabowath in forum Computers and Peripherals
    Replies: 2
    Last Post: 02-15-2007, 08:44 PM
  2. How to install service httpd restart ?
    By mouseattack in forum Hosting Security and Technology
    Replies: 2
    Last Post: 07-21-2006, 07:02 PM
  3. Replies: 2
    Last Post: 03-09-2004, 08:50 PM
  4. HTTPD Restart...?
    By JasonBD in forum Hosting Security and Technology
    Replies: 3
    Last Post: 12-15-2002, 03:27 PM
  5. httpd restart and DOH!
    By wormie in forum Hosting Security and Technology
    Replies: 6
    Last Post: 11-05-2002, 02:36 AM

Posting Permissions

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