# Shutdown FreeBSD 4.2



## andy8 (Mar 16, 2011)

I'm running FreeBSD 4.2 and couldn't shutdown the system. I used `shutdown -p now` similar to Release 8.1 but didn't work. I've also used `shutdown +1 now` (shutdown in 1 minute) but it only shuts the root user down.

What command should I use to shutdown?


----------



## SirDice (Mar 16, 2011)

I've been using the shutdown command since version 3.something. It should work.


----------



## nekoexmachina (Mar 16, 2011)

> but it only shuts the root user down.


What do you even meen by that?


----------



## Beastie (Mar 16, 2011)

^ that only root can shut the machine down?

That would be because the user is not a member of the operator group.


----------



## andy8 (Mar 16, 2011)

Each  time  I  use  the  command  (shutdown -p now)

I  get  the  below  message. 
"The  system  is  halted,  Press  any  key  to  re-boot."

When  click  something  it  re-boots. Its  just  not  shutting  down.


----------



## wblock@ (Mar 16, 2011)

See shutdown(8).
`# shutdown -p now`

Yes, shutdown in 4.2 had -p (just checked).  You might need to add

```
apm_enable="YES"
```
to /etc/rc.conf.


----------



## Nukama (Mar 16, 2011)

Had the same problem in my first attempt to shutdown FreeBSD with shutdown(),
since then I'm using init().

`# init 0`
or [CMD=""]sudo init 0[/CMD]

Here are the Run-levels for init.

```
Run-level	  Signal     Action
     0		  SIGUSR2    Halt and turn the power off
     1		  SIGTERM    Go to single-user mode
     6		  SIGINT     Reboot the machine
     c		  SIGTSTP    Block further logins
     q		  SIGHUP     Rescan the ttys(5) file
```


----------



## SirDice (Mar 16, 2011)

andy8 said:
			
		

> Each  time  I  use  the  command  (shutdown -p now)
> 
> I  get  the  below  message.
> "The  system  is  halted,  Press  any  key  to  re-boot."
> ...



See the manpage. It requires supported hardware to be able to turn off the machine. When that message is shown you can safely turn off the machine, everything has been shutdown.


----------



## andy8 (Mar 16, 2011)

When I used (# init 0) as specified, the system 'Goes down Immediately' and then reboots again.

This was the same effect I got when I executed [cmd=]shutdown -p now[/cmd]


----------

