How To Shutdown (Turn Off) OpenBSD

Written by: Donovan / Last updated: Oct 17, 2022

How do you shutdown/turn off OpenBSD correctly?

I’ll assume you’re logged into OpenBSD with an open terminal (either bare metal install or VirtualBox).

You have two (or possibly three) options for shutting down OpenBSD:


This is your standard shutdown command:

# As root
halt -p
# As user
doas halt -p

The halt command will “halt” the system. The -p flag tells it to “power down” as well.

On older versions of OpenBSD, you may need to add this line to /etc/sysctl.conf:


Or change this line in /etc/rc.shutdown:

"powerdown=NO" # Change to "powerdown=YES"

TIP: If you want to give your user permission to turn off the computer without doas, then add the user to the operator group (edit /etc/group).


The shutdown command is basically a layer on top of the halt command. The only difference is that shutdown allows you to:

  1. Send out a shutdown message to all logged in users.
  2. Stipulate a time to shutdown.

To shutdown now and send a message to everybody:

# As root
shutdown -p now See ya
# As user
doas shutdown -p now Later

NOTE: Depending on your version of OpenBSD, this command may or may not work by default.

Hit your power button

In most cases, simply pressing the power button on your PC or laptop should trigger a shutdown on OpenBSD without any configuration needed.

View Archive