Since OpenBSD is different from the other *nixes, we’re going to take a quick peek at installing OpenBSD, performing package installations, and service management.

Obtaining

Download the appropriate image here. Chances are you want installXX.iso for VMs, and installXX.fs for USB drives. Go ahead and burn it or mount it on your system and boot it up.

Installation

Installation Intro Picture

Go ahead and press I to install.

If you don’t use QWERTY, go ahead and pick a keyboard type. I use Dvorak, so I type “us.dvorak”.

Self-explanatory: Pick a hostname, a network interface, dhcp/manual, etc.

If you plan to make this a desktop, make sure you pick Yes for “Do you expect to run the X Window system?"

The auto disk layout should be fine for most purposes.

Sets will be available on your install medium (unless you’re doing something more advanced, in which case you should be able to deal with this): Installation Sets Picture

Great, we’re done: Installation Complete Picture

Go ahead and reboot! Login, and if you’re using X, run startx to be greeted with retro beauty: X default desktop picture

Package Management

OpenBSD packages are referred to as ports. These allow you to install 3rd party applications, which are tailored to OpenBSD.

OpenBSD uses pkg_* commands, **do not confuse this with Linux pkg**. For beginners, there are really only three commands you’ll need to know: OpenBSD pkg commands picture

  • pkg_info – this is your query tool. It is similar to yum search, apt-cache search, etc.
  • pkg_add – this is how you install packages. It is similar to yum install, apt-get install, etc.
  • pkg_delete – this is how you remove packages.

Here’s a sample of pkg_info: OpenBSD pkg_info sample picture

and pkg_add: OpenBSD pkg_add sample picture

Service Management

This section is more for people who have never known a world without systemd.

We can query, start/stop services using rcctl.

rcctl ls all – list all services rcctl check [service] – check if service is up rcctl start [service] – start a service rcctl stop [service] – stop a service

Listing services: rcctl ls picture

Checking a service is up: rcctl check picture

Services will not be permitted to start (without force) until they are added to your /etc/rc.conf.local file. It will usually be the flags, such as httpd_flags="" for httpd. Refer to the service documentation. Note: adding your service to your rc.conf.local will make it start on boot!: rc_conf_local

Up Next

Next post, we’ll look into replacing the default X window manager with something more modern.