I’ve been considering moving my blog back to a FreeBSD web server. I’d hosted it that way for years and recently switched it to a Linux machine so I could make Octopress work properly. It uses some old, outdated Ruby gems, and it just seemed easier.
But with a new redesign coming and a new Hugo back-end, I’ll be bringing my hosting machine back to FreeBSD.
I recently read FreeBSD is an amazing operating system, which got me thinking:
Can FreeBSD be a viable desktop operating system for developers in 2020?
In this article:
I’ll talk about :
Let’s dig in.
I first tried out FreeBSD in about 1998. Frustrated by Windows95, Linux intrigued me , and I had been using it for a couple of years. A friend suggested FreeBSD, so I ran out to Portland to Egghead software and bought a copy.
I found it pretty frustrating at first. But I had a giant manual to reference (there wasn’t much of a Google in 1998), so I dug in. One thing I noticed right away, the documentation seemed clear and accurate. It told me how to do something, and if I followed it, I got the expected result. I was hooked.
I first hosted JeremyMorgan.com on an old Pentium machine running FreeBSD 4 sitting in my garage. My first real tech job was working with FreeBSD, and I dove in headfirst into learning and using it. It was my daily driver for years, and I ran a web hosting service with FreeBSD. We had no catastrophic failures with it. I’ll try not to let that bias my review here.
Eventually, I started working as a developer and using Linux every day. To match my environment at home with work, I started drifting away from FreeBSD. Soon enough, I wasn’t using it at all, except for hosting my website.
So recently, after reading about FreeBSD and researching online, I installed it again. I fired up a virtual machine, and it had some quirky errors, and things had changed a little in the 15 years since I had used it as a desktop.
I quickly put it on real hardware. I have an i7 machine I use for running virtual servers and had an old SSD lying around, so I threw FreeBSD 12 (Stable) on it. There was minimal tinkering involved, and it was up and running. As you might expect, older hardware is easier to set BSD up on.
After experimenting with it, I put it on my brand new laptop. Some hardware wouldn’t work with it, specifically my wireless network card. So I ended up putting FreeBSD 13 (Current) on it.
I installed FreeBSD 12 (Stable) on my lab machine, and on my main work machine. I used the LXDE desktop environment because I’m old school and I like it.
I was surprised by how many things worked well in FreeBSD. I set up my development machine to match my Arch Linux machine as much as possible. Here’s what I do with that machine:
So, can I set a FreeBSD machine up to do all of these things? Mostly I could. After being away from FreeBSD for a while, it surprised me with how much stuff was available that I could install with a single line like this:
pkg install vscode
Here’s what worked exactly as expected:
Here’s what didn’t work or was not available:
So I wasn’t able to make a mirror of my Arch Linux environment, but I was successful with quite a bit. After using it for two weeks, I’ve determined how developers can use FreeBSD as a desktop, and then I’ll explain why you would want to.
FreeBSD is all over the server world and has an enormous community. Anyone who does development or maintenance on FreeBSD itself or its packages not only can but should use FreeBSD as their workstation. That goes without saying.
Also, for C, C++ and Python developers FreeBSD is probably your best possible choice because of the number of tools and packages available. This has been true for a long time.
But I’ll address my audience (readers of this blog) and their needs.
Node seems to work well, and I could spin up a React App, and do some modification to it. I couldn’t get the React CLI to work, mostly because of nodegit, which seems to be the Achilles heel when installing the React CLI on anything but mainstream platforms/Operating Systems.
Angular works great, I did some playing around with it, SASS and the other dependencies ran flawlessly.
Vue CLI runs great, though I didn’t do much to push it.
Overall: I didn’t run into any significant snags doing front end things. I believe a front end developer could use FreeBSD as their development machine, and it would be similar to using Linux.
This one is tricky since there are so many options to choose from. I could get a lot of things working well, and I know of others that used on the back-end without problems in FreeBSD. This includes:
If you work with any of these technologies, they should be right at home and functional on a FreeBSD workstation.
If you’re a .NET Core developer, FreeBSD might not be for you. There are a few ways to install it, but it seems like it only runs under Linux compatibility, and it’s an ancient version. I don’t think the FreeBSD die-hards are too excited about working on a Microsoft product on their platform. But with enough work, I’m sure 3.0 is possible.
So, system developers, front end, and back-end developers could use FreeBSD as their development workstation, but why would you want to?? Read on.
If you’re reading this far, you’re likely either using Windows, Mac, or Linux for development. You might think: Why should I change? What’s the point?
Again, I’ll try not to let my personal bias enter this article, but most of the reasons you love OSX or Linux could be reasons to love FreeBSD even more. I’ll explain.
FreeBSD is very close to OSX and Linux. That stands to reason as OSX was originally based on BSD Unix, and it’s run parallel to Linux for many years. They are similar, however, they are not the same.
Here’s why you might want to run FreeBSD:
Linux is a kernel with repos, FreeBSD is a system - Ok, I’ll get some emails about this, but Linux is pretty fragmented. FreeBSD is not. FreeBSD has a single source of truth in both its documentation and packages. That leads me to my next point.
It’s a carefully crafted ecosystem - It’s no walled garden, but there is good leadership in the ecosystem to make sure things don’t get too fragmented. This might upset the bleeding edge folks, but FreeBSD maintainers are very strict about what gets added, and when. They strive for cohesiveness, and it shows.
Generally, FreeBSD performs better than Linux - Don’t expect exponential differences, but many tests have shown that FreeBSD performs better than Linux, especially in high CPU situations.
The documentation is incredible - One thing FreeBSD maintainers take pride in is documentation. If you’re stuck, as I have been many times, the documentation will lead you to salvation.
FreeBSD often has “one way to do something” - This is both a benefit and a disadvantage. But often there is one way to do things according to the designers/maintainers. This can make things easier, but some say it stifles innovation. However, if you need a software package, most of the time, you can either use pkg to install it or build it from ports. Simple, and easy.
The Ports system is awesome - So if you’re afraid of compiling from source in Linux, it’s a different story in FreeBSD. If you need to compile something from source (even the whole system), it’s painless in FreeBSD. You’ll spend a long time compiling (that’s unavoidable), but you won’t have nearly as many errors and weird events as you do in Linux.
There are certain times you wouldn’t want to use FreeBSD as a developer.
If packages aren’t available - Sometimes packages aren’t available, Linux emulation isn’t a great solution, and there’s no reasonable horizon. If you’re in this situation, FreeBSD may not be the best choice. If you’re a .NET Core developer, for instance, it’s probably not the top choice.
If you need Docker/Kubernetes - So, according to the documentation Docker is broken. I was able to get some basic containers going, and everything seemed fine, but it doesn’t seem like Docker is in a good place with FreeBSD. FreeBSD users prefer to use jails, so they aren’t putting as much effort into Docker. If you’re using Docker for your daily work, this may be a red flag.
It can be challenging to set up - FreeBSD users will counter this by saying it’s worth the work, but FreeBSD can be difficult and frustrating to set up. There’s a lot to learn, and you may spend a lot of time tinkering. If you want to get up and running quickly, it may not be for you.
If you want to try FreeBSD, I would suggest downloading VirtualBox and creating a virtual machine to put FreeBSD on. This is the easiest way to try it out without doing drastic things to your machine.
You will need to:
Download FreeBSD for your CPU. You can get Virtual Machine images for it that makes things a little easier. You will need to choose between RELEASE and STABLE, and I’ll explain the differences below. I would recommend STABLE if you can.
Read this documentation on installing FreeBSD - It’s very thorough, and it will help you through the rough spots.
Choose a Desktop Environment - If you’re a Linux user, you already know what this is about. When you install FreeBSD, you’ll be greeted with a prompt, so you have to install some kind of environment if you want a GUI.
Bookmark the FreeBSD forums - This is the place to get help and share what you’ve learned.
Once you do this, you’ll be well on your way to enjoying FreeBSD, and you might find it’s the operating system you want to stick with. You’ll be in good company.
So with FreeBSD, you have two different versions, STABLE and CURRENT. It’s exactly what it sounds like. “Stable” is a version that has been thoroughly tested by FreeBSD contributors. It’s considered stable for Production use and is supported by the FreeBSD Foundation.
Current is a more of a bleeding edge version of FreeBSD. It contains all the latest and greatest stuff, but it might not work. There’s also debugging and monitoring going on in it, so it’s a mixed bag. Since I had very few options, I put Current on my laptop.
My laptop has an EFI system. To dual boot it with Windows 10, I had to install RefIT and make some boot menu entries. Nothing terrible, but not so fun for beginners. You’ve been warned.
To answer the big question: yes. It can. You can do a ton of modern development in FreeBSD, with the advantage of having a fast, stable system. Once you get it configured, it can “stay out of your way” while you get real work done. It comes with a variety of tools available to assist development. Foremost FreeBSD is built for development.
If you want to know what's going with FreeBSD and what the future looks like, check out this interview with Deb Goodkin, executive director of the FreeBSD Foundation.
If you end up trying FreeBSD for yourself let me know in the HackerNoon forums! I’d love to hear your feedback about using it.