geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


TIP: Use the shutdown command
Miscellaneous Posted by Jason on Wednesday July 11, @09:44PM
from the bsd-has-its-ups-and-downs dept.
It is very important that you do not just turn the power off on your FreeBSD system (or any Unix system). You need to execute the shutdown command to ensure that your system is brought down properly.

When you issue the shutdown or halt commands, the system kills all processes, writes all unsaved information to disk (syncing the disks), dismounts the filesystems and marks them as clean. These are all very important items and will ensure that your system comes back up properly when restarted.

There are several ways to execute a shutdown on your system and all of them require you to be logged in as root.

  Login: root
  Password: *******

The simplest form is to type:

halt

This will bring the system down properly. You will know the system is down when you see the following messages:

  The operating system has halted.
  Press any key to reboot.


At this point you may either turn the power off, or press any key (enter for instance) and the system will reboot itself and start loading the operating system again.

Another command that performs the exact same function as the halt command is:

shutdown -h now

The -h switch stands for halt. When this command is executed, the system will display the same shutdown messages as above.

If for some reason you would like to shutdown and instantly reboot your system, there are a couple of fast commands to do that as well:

reboot
or
shutdown -r now


Note:To learn more about shutdown and other commands, refer to the man pages.

man shutdown

<  |  >

 

Related Links
  • Articles on Miscellaneous
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: TIP: Use the shutdown command
    by Santhosh Joseph on Sunday October 14, @11:22PM
    How can I setup the machine to Powerdown (ATX form factor) after issuing 'shutdown -h now' or 'halt -p' command ?
    [ Add a Reply to this ]
    • Re: TIP: Use the shutdown command
      by Jason on Tuesday November 06, @05:32PM
      apm support is disabled by default in the kernel. You have to edit your kernel config and compile a custom kernel with the device:

      apm0 at nexus? flags 0x20 #Advanced Power Management

      Next, you have to add the following to your /etc/rc.conf.

      apmd_enable="YES"
      apm_enable="YES"


      You will also have to enable apm in your system BIOS.
      [ Reply to this ]
    Re: TIP: Use the shutdown command
    by Maarten on Tuesday November 06, @12:43PM
    Does CTRL-ALT-DEL do the same?
    [ Add a Reply to this ]
    • Re: TIP: Use the shutdown command
      by Jason on Tuesday November 06, @05:33PM
      CTRL-ALT-DEL will cause the system to shutdown and immediately reboot.
      [ Reply to this ]
    Re: TIP: Use the shutdown command
    by mato on Sunday July 10, @12:42PM
    hi,
    you need not be logged as root to perform shutdown. it's enough if you're a member of operator group.
    m.
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]