How to install FreeBSD on Raspberry Pi? (step-by-step guide)

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.

Want the best experience? Become a premium member for ad-free browsing, access exclusive content, and ask questions in our private forums. Your membership helps support the site!

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.

FreeBSD documentation

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 🙂

Also: Want a fun project? Try one of these robot kits ;-)

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

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 models support

Recent models are not necessarily supported on FreeBSD, it may take time to get them fully supported, as the release cycle is slow. You might need to check the release notes for more details, but basically, at the time of my last edit:

  • The Raspberry Pi 4 and 400 are only supported on versions 13+.
  • The Raspberry Pi 5 is not yet supported with pre-built images.
  • Recent releases are only available for ARM64, you might need to check older releases for older models.

There may be other options, like using a custom firmware, but I haven’t tested it, so I can’t recommend it.

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 (14.0 for example).
    • Then, find the image corresponding to the Raspberry Pi (“RPI” suffix) and the right architecture (“arm64-aarch64” for example).
      For example:
      FreeBSD-14.0-RELEASE-arm64-aarch64-RPI.img.xz
  • Download the CURRENT version:
    • Go to snapshots and then ISO-IMAGES.
    • Select the version you want (15.0 for example).
    • Same thing here, find the FreeBSD images corresponding to the Raspberry Pi, for example:
      FreeBSD-15.0-CURRENT-arm64-aarch64-RPI-20240523-1e84b85aad10-270337.img.xz

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.

I generally use Raspberry Pi Imager for everything now, even for custom images. Here are the main steps:

  • Start Raspberry Pi Imager.
  • Click on “Choose OS“, and find “Use custom” in the list.
  • Select the image you just downloaded from your downloads folder.
  • Click on “Choose storage” and select the installation media (your SD card).
  • Click “Next” (you can skip the OS customization options) and wait a few minutes.

After a few minutes, your SD card is ready to use.

I have a full guide on how to install and use Raspberry Pi Imager on the site, feel free to check it out if you need more guidance.

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.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

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:

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Video

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.

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?

Whenever you’re ready, here are other ways I can help you:

The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.

Master your Raspberry Pi in 30 days: 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.

The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

How would you rate this article?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Spread the word!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Similar Posts

6 Comments

  1. I have HDMI monitor (television using a hdmi input) , usb keyboard, usb mouse connected to 8gig dram, Raspberry Pi 4B.
    Comment out line, #hdmi_safemode=1
    Hdmi_mode=16 for 1920×1080 pixel output

    FreeBSD boots up, but nothing on keyboard plugged into blue USB 3.0 connector.

    Did you use CP2102 like usb to serial interface for serial connector.
    I did not see your setup connections in above article. Did I miss it somewhere?

    I just want to make usb keyboard and mouse input operational on FreeBSD boot up.

    Later I read the hint in the OpenBSD-arm mailinglist that the fb0 line is useable. Writing “set tty fb0” to /etc/boot.conf than made the system perfect.

    I have telegram group GhostBSD ARM port setup with FreeBSD, OpenBSD, netbsd hints posted. Thanks for your efforts in your raspberrytips.com website.

    https://t.me/joinchat/ST6N61pnu3Di8zgk

    1. I just used the HDMI output with the default configuration, and it worked perfectly.
      So, I can’t help you with this issue.

      1. Thanks for reply, Patrick. In reading, someone mentioned plugging a USB 2.0 keyboard into lower left USB 2.0 port on the raspberry pi model 4B. Which usb port did you plug usb keyboard into?

        Another person mentioned that the raspberry pi firmware in the /boot directory needed to be reverted to previous version firmware.

        Pete Batard, has the latest version 1.24 as of ?? February 26, 2021 ??

        URLs to read with many specific details about configuration settings.

        https://rpi4-uefi.dev/
        https://github.com/tianocore/edk2-platforms/tree/master/Platform/RaspberryPi/RPi4
        https://github.com/raspberrypi/rpi-eeprom/releases

        1. It doesn’t matter where you plug your keyboard (in general I’m using the USB2 ports to keep the USB3 for something else).
          No idea for the firmware downgrade sorry

          1. [Solved] The February 2021 snap shots have a USB keyboard bug. Use the March 11,18 versions of FreeBSD 14.0 CURRENT

Comments are closed.