1. Download the FreeBSD image for Raspberry Pi from the official website.
2. Insert a microSD card into your computer and format it using a disk formatting tool.
3. Extract the FreeBSD image file and write it to the microSD card using a disk imaging tool.
4. Insert the microSD card into your Raspberry Pi and power it on.
5. Connect your Raspberry Pi to a monitor and keyboard.
6. Log in to the FreeBSD system using the default username and password.
7. Update the system using the freebsd-update command.
8. Install any additional packages you need using the pkg command.
9. Configure the system to your liking using the sysctl command.
10. Reboot the system and enjoy your FreeBSD installation on Raspberry Pi.
FreeBSD is an original operating system you can install on Raspberry Pi to experiment a bit outside Linux. But the process is not always easy if you are used to working on Debian-like systems.
Today, we’ll see how to install it on a Raspberry Pi, to configure it and use it like almost like any other operating system.
FreeBSD is an open-source operating system, available on Raspberry Pi since 2014. It’s a good solution for any usage (server or desktop)
It’s not based on Linux, as they develop their code for everything. Even if there are many similarities, it includes several differences, more or less visible.
To help you as much as possible, I will start by an introduction to FreeBSD, then I’ll show you how to install it, and finally, everything you need to know to use it the way you want.
Note: I’m not an expert in BSD systems. I’m a fan of Pfsense which is based on FreeBSD, but I never really used it beside that. The goal here is only to share with you my notes about this system.
If you’re looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.
FreeBSD introduction
Presentation
FreeBSD is not a new system, far from that. The first release comes in 1993! (same year as Debian).
The main goal is to offer a lightweight system, with critical part related to stability. So you can use it almost anywhere.
FreeBSD works on two branches :
- STABLE: The main branch, each new major version is released from the STABLE branch (RELEASE)
- CURRENT: It’s the development branch, to get the latest improvements, but less speed and stability.
Usage
FreeBSD can be used in any situation. It’s fast, stable and secure. So, it’s perfect for a Raspberry Pi, but also for a server or a desktop usage.
By the way, the FreeBSD FAQ is pretty clear about this:
Can FreeBSD replace my current operating system?
For most people, yes.
We’ll see in the next parts how to install it on your Raspberry Pi, but it’s also a solid system for your computer or on server.
FreeBSD has been adopted by many companies over the world.
I already told you about Pfsense, but other brands like IBM, Apple or Sony are using parts of the FreeBSD code (for example, the PlayStation 4 system is a fork from FreeBSD).
Some NAS operating systems are also based on FreeBSD (FreeNAS for example).
FreeBSD vs Linux
As I told you in introduction, FreeBSD is not a Linux-based system.
Systems on Linux, are all using the same kernel and basic drivers, and then add many applications to offer a specific solution at the end.
FreeBSD don’t use this base, they develop and release everything, including the kernel and drivers.
However, the differences while using it are minimal (I will show you the main ones).
But you may have some commands working differently on Linux and FreeBSD.
FreeBSD strengths
So, why do I need to try FreeBSD if it’s almost the same thing?
As always when I test systems, the main goal here is to experiment, and see how it works. So you’ll get more details at the end.
But in theory, FreeBSD is a minimal system that should be faster, more secure and with less compatibility issues than most Linux systems.
We’ll see now if this is true for the Raspberry Pi version ?
Install FreeBSD on Raspberry Pi
Let’s see how to install a basic FreeBSD system on your Raspberry Pi:
- Download the latest version from the official FTP (RELEASE or CURRENT image).
- Flash it with Balena Etcher or Raspberry Pi Imager to your micro SD card.
- Boot the Raspberry Pi and start the system configuration.
Raspberry Pi 4
The Raspberry Pi 4 wasn’t supported on version 12.x and older.
So, if you have a Raspberry Pi 4, consider taking the latest version available. Currently, the 13.x and above are the only working for Raspberry Pi 4.
Unfortunately, if t’s a CURRENT version, it’s a debug one, with less stability and performances issues. But for a test, it’s ok.
The other option is to use a custom firmware, available here on GitHub, and replace the files on the SD card for the RELEASE version (edit: you don’t need this anymore, just download version 13 or above).
Download
FreeBSD offers pre-built images for the ARM and ARM64 architecture.
The ARM64 version is working fine on Pi 3B+ and 4, I didn’t test on other models.
Here is the general link to the FTP server: https://download.freebsd.org/ftp/
Once here, you have two choices:
- Download the RELEASE version:
- Open the releases subfolder and go to ISO-IMAGES.
- Select the version you want to install (13.0 for example).
- Then, find the image corresponding to your Raspberry Pi model.
For example:FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img.xz
If you have the Raspberry Pi 3 (look for arm architecture, and the last part of the name correspond to the Raspberry Pi model).
- Download the CURRENT version:
- Go to snapshots and then ISO-IMAGES.
- Select the version you want (14.0 for example).
- Same thing here, find the FreeBSD images corresponding to your model, for example:
FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20210902-42c7760be3e-249088.img.xz
Currently, there is no specific version for the Raspberry Pi 4, so take the RPI3 one.
Download the file you need on this server, and feel free to ask in the community if you are lost with this, or if I need to update it for the latest versions.
SD card preparation
Once you have the image on your computer, the installation part is similar to what you may already know with other systems.
My favorite tool to create SD card is Etcher, here is how to use it:
- Download Etcher on the official website here if needed.
It’s available on any system (Windows, Linux, macOS).
I didn’t try on FreeBSD ? - Install it and start the application, the window looks like this:
- Click on “Select image” and browse to the FreeBSD image location (you don’t need to extract the files).
- Insert your SD card into your computer.
Etcher will select it automatically. - Then, click on “Flash!” to start the SD card creation.
After a few minutes, your SD card is ready to use.
First boot
On the first boot, a terminal prompt will appear where you need to log in.
There are two users available by default:
- freebsd is the default user, the password is freebsd
- root is the administrator, the password is root
Connect with root for now and continue to the next part.
If you want, SSH is enabled by default, so you can absolutely continue from your computer once the network cable plugged.
But the root user is not accessible directly with SSH. You need to connect with “freebsd” and then use “su” to switch to the root user.
There is no sudo command available by default.
Configure FreeBSD on Raspberry Pi
Once installed and logged in, it’s time to check that everything is configured properly.
Packages management
With the tool I show you just after, you can manage almost everything in your configuration, but the “Packages” part didn’t work for me (didn’t found the server).
So we have to do this manually.
The package management tool on FreeBSD is “pkg”.
It works almost the same thing as “apt” or any other tool in command line.
I’ll show you how to use it later, but for now, you have to install it with this command (with the root user):pkg clean -a && pkg upgrade -f
Configuration tool
There is a tool on FreeBSD to manage most of the configuration from the terminal (a bit like “raspi-config” on Raspberry Pi OS).
To open it, enter the command:bsdconfig
The main menu looks like this:
Use the arrows to scroll to the part that you need to change, and follow the instructions to configure it (if you are connected with SSH, the mouse is working).
For example, to change the root password (which is recommended), go to “Root Password” and enter the new one.
Network configuration
The network will work directly with an Ethernet cable if there is a DHCP server on the network (your router probably).
If not, you can go to “Networking Management” in bsdconfig and set a static IP.
You can also use this tool to find your current IP address.
The Wi-Fi is not supported yet, as the driver is not included in the image.
You can try a USB stick to fix this (my DLINK model didn’t work, but maybe there is something to install).
Note: Personally, I’m using a Wi-Fi extender to plug Ethernet cable on systems that doesn’t support Wi-Fi for Raspberry Pi. This one on Amazon is working perfectly in this case if you are interested.
Users and groups
As I told you, two users are already there after the first boot: freebsd and root. But you can obviously change this as you want.
In the “Login/Group Management” from bsdconfig, you can:
- Manage users:
- Add Login to create a new user.
- Edit/View Login to see a list of current accounts on the system. In addition to the two we are using, there are many more. You can also change them in this submenu. For example, I recommend editing the password for freebsd too.
- Delete Login: only do this once you have tested that everything is working without it. For example, you can create a “pi” account and remove “freebsd”.
- Manage groups:
- It’s almost the same thing as for the users.
- You don’t really need this except for specific applications.
- To add a user in a group, you’ll probably use the Edit/View Login menu.
For your information, the “wheel” group add the permission to use “su”.
So, if you create a new user (like “pi” in my example), you need to add it in the “wheel” group if you want it to switch to the administrator account.
Extra tips
In this last part, I’ll share with you a few other things that may be important depending on your current level on FreeBSD.
The pkg command
We already used the “pkg” command to manage packages that is the main change with Debian.
Here is a few examples on how to use it:
- pkg update: update the depository sources
- pkg upgrade: upgrade the packages you are already using on the system
- pkg search <string>: find the package you want to install, example:
- pkg install <package>: install the package you want, example:
pkg install nano
- pkg remove <package>: uninstall any package on the system
- pkg help: get a list of all other options available
As you can see, it’s really close from apt, yum or any other package management tool you might know. So, it should not be complicated to switch for pkg.
Text editors
By default, the only text editors pre-installed on the system are vi and ee.
Personally, I don’t really like these editors, so I installed nano with:pkg install nano
If you prefer, vim is also available:pkg install vim
And probably other ones, try “pkg search” if you want to check for your favorite ?
If you need help using these tools, I have two cheat sheets that you might like:
Sudo
As the root user is directly available after the installation, the sudo command is not installed automatically with the system. But you can install it later if needed, here is how to do this:
- Install the “sudo” package:
pkg install sudo
- To add the permission to use it to one user, open the sudoers file:
visudo
- Edit the file as needed, for example, to add all the permissions to freebsd, add this line:
freebsd ALL=(ALL) ALL
On the next login, freebsd will be able to use sudo with any administrator command, for example:sudo bsdconfig
Graphic interface
I have spent several hours trying to install a graphic interface, but unfortunately, I can’t achieve it.
Many graphic interfaces are available in the repository: Gnome 3, KDE, XFCE4, LXDE, etc.
But none of them worked, even on the latest version.
The error is always the same: it doesn’t start automatically, and when I start it manually I get an error like “No screen found”.
I find several useful links that I’ll share with you, and if anyone manages to do this, I will edit this post with the solution:
Video
Want to chat with other Raspberry Pi enthusiasts? Join the community, share your current projects and ask for help directly in the forums.
Conclusion
That’s it, you now have a pretty good overview of the FreeBSD system on Raspberry Pi.
Basically, it’s a powerful system, I found it really fast in the RELEASE version, even on Raspberry Pi 3. But it drives me crazy to not find a solution for the desktop environment. Also, the lack of support for Raspberry Pi in general (like the Wi-Fi), might be an issue for some of you.
Personally, I didn’t really find an interest to keep it on my Raspberry Pi, I have my habits on Raspberry Pi OS / Debian like systems, and I don’t have any project right now where it could be useful.
But it’s just my opinion after this quick test, what about you?
Additional Resources
Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.
Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.
VIP Community
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.
Need help building something with Python?
Create, understand, and improve any Python script for your Raspberry Pi.
Learn the essentials step-by-step without losing time understanding useless concepts.
Get the e-book now.
You can also find all my recommendations for tools and hardware on this page.
How to Install FreeBSD on Raspberry Pi (Step-by-Step Guide)
Installing FreeBSD on a Raspberry Pi is a great way to get a powerful, open source operating system running on your device. FreeBSD is a Unix-like operating system that is based on the Berkeley Software Distribution (BSD) and is used in many commercial and open source applications. This guide will walk you through the steps of installing FreeBSD on your Raspberry Pi.
Step 1: Download the FreeBSD Image
The first step is to download the FreeBSD image for your Raspberry Pi. You can find the images for the various versions of FreeBSD on the FreeBSD website. Once you have downloaded the image, you will need to unzip it and then copy it to an SD card.
Step 2: Boot the Raspberry Pi
Once you have the image on the SD card, you can insert it into your Raspberry Pi and then power it up. When the Raspberry Pi boots, it will automatically detect the FreeBSD image and start the installation process.
Step 3: Configure the Network Settings
Once the installation process has started, you will need to configure the network settings for your Raspberry Pi. This includes setting up the IP address, subnet mask, and gateway. You can do this by using the command line interface or by using a graphical user interface.
Step 4: Install the Packages
Once the network settings have been configured, you can then install the packages that you need for your Raspberry Pi. This includes the base system, the X Window System, and any other packages that you may need. You can do this by using the command line interface or by using a graphical user interface.
Step 5: Configure the System
Once the packages have been installed, you can then configure the system. This includes setting up the users, setting up the services, and configuring the system to your needs. You can do this by using the command line interface or by using a graphical user interface.
Step 6: Reboot the System
Once you have finished configuring the system, you can then reboot the Raspberry Pi. This will complete the installation process and you will be able to start using your Raspberry Pi with FreeBSD.