FreeBSD is a solid choice on a server, and it’s ubiquitous in the infrastructure world, but how does it hold up as a desktop machine? As a developer workstation? I found out.
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.
Can FreeBSD be a viable desktop operating system for developers in 2020?
In this article:
I’ll talk about :
- What led me to FreeBSD
- How it was setting it up in 2020
- What kind of developers can benefit from FreeBSD
- What you can do to get started
Let’s dig in.
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.
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:
- Web Development (Front-end and back-end)
- GoLang Development
- Python Development
- Containers / Virtualization
- Writing (articles like this!)
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:
Here’s what worked exactly as expected:
- VS Code (thankfully)
- Various packages built from source
Here’s what didn’t work or was not available:
- React CLI
- Sublime Text
- Atom editor
- VMWare Workstation
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.
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.
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.
You will need to:
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.
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.