Tuesday, May 02, 2017

Switching to OpenBSD

Short story:

After 12 years, I switched from macOS to OpenBSD.  It's clean, focused, stable, consistent and lets me get my work done without any hassle.

Long story:

When I first became interested in computers, I thought operating systems were fascinating. For years I would reinstall an operating system every other weekend just to try a different configuration: MS-DOS 3.3, Windows 3.0, Linux 1.0 (countless hours recompiling kernels).  In high school, I settled down and ran OS/2 for 5 years until I graduated college. I switched to Linux after college and used it exclusively for 5 years. I got tired of configuring Linux, so I switched to OS X for the next 12 years, where things just worked.

I was pretty happy with OS X.  It gave me Unix and mostly got out of the way so that I could write software.  I wrote about enjoying Apple's simplicity.  Snow Leopard even spent an entire release cycle just fixing bugs and improving performance.

But Snow Leopard was 7 years ago. These days, OS X is like running a denial of service attack against myself.  macOS has a dozen apps I don't use but can't remove. Updating them requires a restart.  Frequent updates to the browser require a restart.  A minor XCode update requires me to download a 4.3 GB file.  My monitors frequently turn off and require a restart to fix.  A system's availability is a function of mean time between failure and mean time to repair.  For macOS, both numbers are heading in the wrong direction for me. I don't hold any hard feelings about it, but it's time for me to get off this OS and back to productive work.

So where do I go now?  We own 5 Chromebooks and they have great availability.  Updates are infrequent, small, fast and nearly transparent.  Unfortunately, I need an OS where I can write and compile code.  I also want it to run on older, commodity hardware so I can replace a broken laptop for $400 instead of $2,000.

I considered several Linux distributions.  Lubuntu seemed promising, but it was too bloated for my taste.  A couple years ago, I tried Ubuntu on a Dell XPS Developer Edition for a few months.  Even with hardware designed for Linux, it was too fragile. Desktop Linux has also become even more complex than when I used it a decade ago.  I just want to get my work done, not feed and maintain an OS.

I was reminded of OpenBSD during the Heartbleed scare.  While everyone else was complaining about OpenSSL and claiming that open source had failed, the OpenBSD developers quietly drew their machetes and hacked out hundreds of thousands of lines of bad code, forking off LibreSSL where they can keep it clean and stable.  The OpenBSD community is like that: focus on what's really important, hold your code to a high standard, ignore all the distractions.  They're not trying to live in the past, just trying to make the future a place worth living.

Anyway, I found OpenBSD very refreshing, so I created a bootable thumb drive and within an hour had it up and running on a two-year old laptop.  I've been using it for my daily work for the past two weeks and it's been great.  Simple, boring and productive.  Just the way I like it.  The documentation is fantastic.  I've been using Unix for years and have learned quite a bit just by reading their man pages.  OS releases come like clockwork every 6 months and are supported for 12.  Security and other updates seem relatively rare between releases (roughly one small patch per week during 6.0).  With syspatch in 6.1, installing them should be really easy too.

I also enjoy that most things are turned off in OpenBSD by default.  The base installation is sparse.  It assumes that I'll enable a service or install a tool if I want it.   So I'm not constantly facing updates for software I never use.

My experience with OpenBSD is still young, but I really like what I see so far.


Nathan Shimp said...

Nice article! I've been using Linux for a long time, but recently I've been experimenting with OpenBSD. What desktop do you use? Or do you stick with just a WM? What's your editor of choice?

Daniel Hopkins said...

Great article and kudos for choosing OpenBSD!I'm interested in what your development environment will be now on OpenBSD as you mentioned XCode on MacOS (OSX).
What do you plan to code in?

Michael Hendricks said...

I use ratpoison as my window manager with emacs as my editor. On OpenBSD, I often use mg for small editing tasks. I'd like to move away from emacs because it's too big, but haven't found a slender editor that's equally productive for me.

On macOS, I only installed XCode to get gcc. Since that's part of OpenBSD base, I'm satisfied. Most of my development these days is in Go and that's well supported on OpenBSD.

Paul Reagan said...

"...Lubuntu seemed promising, but it was too bloated for my taste. (...) Desktop Linux has also become even more complex than when I used it a decade ago. I just want to get my work done, not feed and maintain an OS."

Hello Michael, do you think that bloating and complexity of nowadays Linux have something to do with SystemD ? Do you prefer SystemV/BSDinit/OpenRC to SystemD ?

Excellent article my friend, congrats !

Michael Hendricks said...

I haven't followed systemd closely, but I'd guess that systemd is a symptom rather than a cause. It feels to me like Linux culture has moved away from the Unix philosophy of simple components that work together. Instead they seem to favor large, monolithic tools which try to be all things to all people.