OpenBSD 6.4: Installing a Seriously Underrated OS in a Virtual Machine

“Safety first” — that’s what they said.

Edit (April, 25th, 2019): Yesterday OpenBSD 6.5 has been released with lots of useful improvements (changelog). I went through my tutorial to see if this guide needed some polishing. It seems everything I wrote is still relevant; the installation process of OpenBSD 6.5 works just fine with this guide. Have fun!

Theo de Raadt and the other developers behind OpenBSD unveiled (pun intended) version 6.4 a few days ago (October 18th, 2018). It’s the 45th release and — like any other release before that — it’s stable, secure and fast.

OpenBSD is perfect for older computers. If you have hardware that is too slow (or too sacred) to be operated with Windows or MacOS, you could resurrect it by installing OpenBSD or a lightweight Linux distribution.

In this article I’ll cover the whole installation process of OpenBSD 6.4 plus the Xfce desktop on a virtual machine running on Solus (a Linux distribution).

Within an hour you can create your own OpenBSD desktop, either on real hardware¹ (the steps are the same in principle) or in a virtual machine.

This is what my virtual Xfce desktop looks like after a little bit of configuration.

Frugal Desktop Fun

The installation of OpenBSD + Xfce took around 20 minutes. The configuration was done in about 5 minutes.

As you can see in the screenshot above, Xfce is clean and tidy. I like it that way. I don’t need eye candy and I know what to expect of an operating system like this. Still, the surface of the stock Xfce desktop environment feels almost ancient in comparison to modern desktop environments like KDE, Budgie or even Gnome and Mate. The overall greyish look of the user interface has become stale over the years.

It’s not really a problem for me but still reason enough to disqualify Xfce for my primary desktop². (I use Solus + Budgie as my development system. It looks pretty and works flawlessly.)

Installing OpenBSD 6.4 + Xfce 4.12

In order to follow this guide you should be familiar with the VirtualBox virtualization software which is available for Windows, MacOS and Linux.

Linux/Unix veterans won’t need this guide but maybe this article motivates them to give OpenBSD another spin?

Step 1

Choose a mirror from that is near you or from which you expect fast download speeds.

I chose the one in Berlin (Germany) because that’s pretty close to where I connect to the internet. For simplicity’s sake we will just use the OpenBSD CDN:

Click on the release number 6.4 and then choose either the “amd64” (64bit) or “i386” (32bit) folder.

I downloaded the install64.iso file.

Step 2

Hint: If you want to install OpenBSD on real hardware you should burn the iso to a CD-R. You can proceed to step 3 in this case. The following steps should be the same as for the installation in a virtual machine.

Start up VirtualBox and create a new virtual machine.

Set the RAM to 2048MB and create a virtual disk with an appropriate size for a full-featured desktop environment like Xfce. I created a disk of ~30GB (dynamically allocated).

After the creation of the virtual disk you can add the install64.iso as a virtual CD. Right-click on your virtual machine (the one with the pufferfish icon) and choose “Settings”, then “Storage” in the left pane.

Choose the downloaded .iso file from the CD-ROM icon near the optical drive select box.

Go up one entry in the left pane to set some “Display” options. Enable 3D acceleration and ramp up the video memory to 128MB.

3D might be useful for the popular conky daemon and desktop compositing in general (which is a default in Xfce).

Press “OK” to exit the settings dialog.

The settings of your virtual machine should look like this or similar.

Step 3

Start the virtual machine and press F12 to interrupt the boot process. Choose the CD-ROM as the boot device.

Press “c” to boot from the virtual CD drive.

Wait until the kernel has loaded. You’ll be asked to (I)nstall or (U)pgrade your installation.

Press “i”, then RETURN to continue.

Step 4

This step consists of many small steps. You can just press RETURN³ most of the time — OpenBSD is known to have sane defaults! The default answers are shown in []’s and they are selected by pressing RETURN.

Pay attention to the console output…

You’ll want to configure at least a few things:

  • choose your keyboard layout (in my case ‘de’ for German)
  • specify a system hostname (e.g. ‘medium64’)
  • connect and configure the network interface (em0 for virtual LAN)
  • set and remember the password for the root account (important!)
  • create a user account (e.g. ‘testuser’) protected by a password

Remember: If you don’t know the answer to some of the questions press RETURN to use the defaults.

After a few more taps on RETURN the installation should begin.

The installation won’t take long; depending on your internet connection speed and hardware configuration it should finish within 5 to 15 minutes.

Now choose the appropriate option to (r)eboot your virtual machine.

Step 5

Press F12 again to interrupt the boot process and press “1” this time to boot from the virtual disk (not the CD-ROM).

After a few seconds you’ll be greeted by a login prompt.

Log in as “root”. You can read your mail as OpenBSD suggests. You can also ignore it but if you’re serious about learning to operate OpenBSD you should probably read it.

Execute the following command to add the other user that you created (not root) to the wheel group⁴.

# usermod -G wheel YOUR_USERNAME

One of the nicest beginner-friendly features in the 6.4 release is the improved behavior of the “pkg_add” command. In the previous releases you had to specify a FTP mirror explicitly, otherwise installation of new packages wouldn’t work. Now it just works.

Let’s install something that enables us to write and edit plain text files.

Install the “nano” package.

# pkg_add nano

You can install multiple packages by specifying them all in one command, separated by spaces.

Now let’s install the Xfce desktop environment and the login greeter (slim).

# pkg_add xfce-extras slim slim-themes consolekit2 polkit
The Xfce desktop and its dependencies are being installed.

When the installation finishes, you have to edit a few files before rebooting.

# nano .xinitrc
Press CTRL+X to exit (and save).

Now, copy the file to the home folder of the user you created earlier.

# cp .xinitrc /home/YOUR_USERNAME/.xinitrc

We have to create/edit two other files in order to start Slim and Xfce automatically in the future.

# nano /etc/rc.conf.local

Add the following lines to the file and save it.

And one more.

# nano /etc/rc.local
Slim is responsible for the nice graphical login screen you see in the next screenshot. (No more terminal logins, yay.)

Step 6

You may now reboot your machine (by typing “reboot” and pressing RETURN) or install more packages.

To install Firefox, Chromium, GIMP and a few other useful applications, you have to use the “pkg_add” command just like you did before.

You can always install more applications from within the Xfce desktop by using a terminal application and logging in as “root” ⁵.

Step 7

If all went as planned, you should now be able to log in as a normal user.

Enter your username, press RETURN, and enter your password and press RETURN again.
If you choose the default panel configuration your desktop should look like this.

Step 8

If you didn’t do this before you might want to install a few more applications. OpenBSD comes with very few preinstalled packages so you can decide for yourself what you want.

In the Applications menu, find the terminal program and install new packages.

Switch to the “root” account first, by typing “su” into the terminal. Put in your “root” password and you’re good to go.

I usually install a standard collection of applications that I find useful for a frugal office desktop system.

# pkg_add firefox chromium vlc thunderbird libreoffice ghostwriter geany htop conky neofetch

Now you can:

  • browse the internet
  • send and receive mail
  • watch videos / listen to music
  • write letters or invoices or whatever you like
  • write free of distractions (ghostwriter ftw!)
  • edit code
  • and show hardware stats and other info on your desktop
Show more or less useful information about your OpenBSD installation (and hardware) with the “neofetch” command.
Browsing Medium ( in the Chromium browser.

Step 9

Playing around with the desktop environment is fun. You can configure a lot of stuff in Xfce.

  • Right-click on the desktop, then click “Desktop Settings” to change the background image.
  • Navigate to the main menu and choose “Settings” to find most of the switches and levers to control your desktop. (“Appearance” and “Window Manager” are of interest if you’d like to tweak the visuals a bit.)
  • You can modify the standard panels (e.g. the taskbar at the top) by right-clicking them and choosing “Panel”, then “Panel Preferences”.

You’ll figure this out in no time. Have fun.

Afterthoughts + Tips

OpenBSD is not for everybody. Most casual computer users don’t like to type commands into a terminal. Most casual users want to use their computers for some form of entertainment — playing Steam games or watching Netflix or using Skype.

That’s not possible with OpenBSD (yet). The licensing model is different from, let’s say, a typical Linux distribution. OpenBSD is free software and it uses solely free components (packages & libraries), e.g. DRM-protected content is a no-go.

As mentioned earlier, OpenBSD (+Xfce) looks a bit dusty. It’s not a bleeding edge distribution like Arch Linux or other rolling release Linux distributions.

OpenBSD is known for its excellent man(ual) pages. Type “man nano” to learn more about the tiny text editor you used to edit the configuration files earlier.

A typical sight on OpenBSD enthusiasts’ desktops. The “man” command showing the “General Commands Manual” for the nano editor.

You can expect every OpenBSD package to have well-written, concise and informative man pages. The man pages are available without an internet connection so if things go south you can still try to fix things on your own.

Use the “man” command to find out more about your system, how it operates and how you can make it work for your purposes.

The OpenBSD community is also known to have a mailing list that users may use to report bugs or ask for advice. Some people say the community is not very beginner-friendly and I tend to agree. But there really is no reason to spam the mailing list with trivial questions when the internet is full of good advice regarding the installation and maintenance of OpenBSD.

Nonetheless, most communication around OpenBSD happens in the mailing lists. Release announcements, changelogs, etc — it’s all there.

You can either subscribe to the mailing lists here or read it without subscribing here or here.


¹ A new OpenBSD version is released roughly every 6 months. You shouldn’t expect support for the more recent hardware. In terms of driver support OpenBSD is far behind run-of-the-mill Linux distributions. 3D-acceleration, OpenGL, Vulkan, Wine, Steam — all the goodies you might be used to are barely on par with their Linux counterparts. Most of the bells and whistles are simply not available in OpenBSD.

² I used Xubuntu for 4 years, starting with the glorious 12.04 release. Xubuntu evolves around the Xfce desktop. The releases beginning with 14.04 didn’t satisfy my expectations and I started my distro-hopping journey.

³ RETURN is the key named “Enter” (or ↵)on most computer keyboards. It’s called RETURN because modern keyboards are still modelled after mechanical typewriters from the past, e.g. the carriage return which is a lever used to move (return) the type element to the first position in the next line.

⁴ The “wheel” group containers user who are allowed to use the “su” command to become root. If you need further info use “man usermod”.

⁵ In a terminal you can type “su” (short for “substitute user”) and press RETURN to become “root” by supplying the corresponding “root” password. The user needs to be in the “wheel” group for this to work!

Frederik Kreijmborg

Written by

Humanoid writing about decadence, depression and IT.