Bonum Certa Men Certa

OpenBSD for GNU/Linux users

Why OpenBSD? It's the BSD used by FSF-Approved Hyperbola, it's more free than FreeBSD (which includes software under NDAs and is moving closer to GitHub) and it's easier to install than NetBSD.

Not everything here is in the FAQ: https://www.openbsd.org/faq/ though looking through it for tips and general information is highly recommended.

Downloading and Installing

  • Simply download the image and dd to USB


  • How about the Shell?

  • You'll find ksh or sh, you can install bash with pkg_add


  • Mounting ext2 and ext3 Partitions

  • ;This will take some getting used to-- a drive known as /dev/sdb on GNU/Linux will likely be sd1 on OpenBSD


  • The corresponding device is /dev/sd1c. Unlike GNU/Linux, in OpenBSD "/dev/sd1c" refers to the entire drive, not /dev/sd1


  • The first partition on sd1 is often /dev/sd1a, be careful because this has nothing to do with /dev/sda on GNU/Linux (which would be /dev/sd0c). To get a list of partitions on sd1, try the command 'disklabel sd1', without /dev


  • OpenBSD does not mount ext3 per se; it will mount ext3 partions without journaling; basically as ext2:

  •   mount -t ext2fs /dev/sdNx /mnt/usb # where sdNx is 'sd' plus the drive number, plus the partition letter

    I plug in a Mouse, nothing happens

  • CTRL-ALT-BACKSPACE will leave your X session, when you login again your mouse (under normal circumstances) will work. This is a quick and dirty method, you may find a better way
  • "You mean I have to restart X whenever I unplug and plug in the mouse?" No, if the mouse was working when X started, you can typically unplug the USB mouse and even switch to a different one without restarting X
  • "USB drives?" This is just about the mouse


  • Window Manager?

  • dwm is recommended-- other familiar DE/WM choices are available using pkg_add


  • Command Line Differences

    where is seq?

  • 'man jot' will tell you how to use the seq equivalent in OpenBSD -- for seq 1 5, you can simply use jot 5


  • where is tac?

  • for typical jobs at least 100,000 lines long or shorter (with lf newlines) you can try piping to | tr '\n' '\r' | rev | tr '\r' '\n' | rev, though if you are counting lines this will add one blank line to the top


  • finding packages

  • pkg_info -Q py


  • installing nano

  • pkg_add nano


  • installing wget

  • pkg_add wget


  • find isn't working

  • find always requires a path, so if you're used to using it without parameters, you at least need 'find .' or 'find . -type f', etc.


  • changing volume (as root)

  • mixerctl lists your settings, mixerctl outputs.master=160,160 will raise the volume from the default 126,126


  • getting a dhcp lease

  • dhclient INTERFACE works; but run ifconfig to get a list of available network interfaces


  • Why isn't the 'Select All' shortcut working?

  • Both tk and gtk applications use keybindings for emacs; there is supposedly a way to change this for gtk, but CTRL-/ does what you would likely expect CTRL-a to do.





  • Related Pages

  • BSD_Watch