In this guide, we will install FreeBSD 13 with GNOME Desktop Environment. The GNOME installation in FreeBSD 13.0 Release is quite a straightforward process once you installed the FreeBSD base system on your machine.
I will perform a bare-metal installation on one of my test machines, but if you prefer to give it a try on an Oracle VirtualBox VM first, you can continue following this installation tutorial.
I will proceed with this installation on a bare-metal machine, but if you want to check if FreeBSD 13.0 and GNOME is your cup of tea, go ahead and follow this installation guide using virtualization such as Virtual Box, VMware, KVM, etc. For macOS users, here’s a detailed guide on how to install FreeBSD On Parallels Desktop.
- A minimum of 4GB of RAM and a minimum of 1.5 GB of free HDD space.
- A USB stick of a minimum of 8GB.
- Internet connection
- ~2 hours spare time (depending on your internet speed).
Note: The Realteck 8811au wireless chipset works out of the box in FreeBSD, and the system can recognize the wireless device during the installation process.
Step 1: Download the latest FreeBSD stable release.
Open a browser and navigate to the FreeBSD website download page.
On the Installer Images, select your machine architecture.
For a relatively new PC or if you plan to install FreeBSD on a virtual machine, select amd64.
You can check if FreeBSD is supported on your hardware on the FreeBSD Release Hardware Notes page.
Step 2: Prepare the FreeBSD USB installer.
In the browser, please navigate to the Balena Etcher website. Download the installer accordingly to the OS you are using (Windows, macOS, Linux).
Install Balena Etcher in your system. Once Etcher installation is completed, insert your USB stick in one of your computer’s USB ports.
Launch Etcher. You will see an interface like this:
Click on Flash from file, locate and select the FreeBSD-13.0-RELEASE-amd64-dvd1.iso you downloaded earlier in your machine. Select target button – your USB stick should be listed as one of the options.
Warning: If you have multiple drives attached to your machine, make sure you chose the USB stick!
Note: Etcher will label the high-capacity drives on your computer as “Large drives” to help you avoid selecting the wrong drive.
Now, click the Flash! button. Type your admin/root password when prompted. This process will take about 10-15 minutes.
Once Balena finished copying the .iso image on your USB, we are ready to proceed with the FreeBSD installation.
Step 3: FreeBSD Installation
Before we begin: If you plan to install FreeBSD on bare-metal or intend to dual-boot with other OS. It is highly advisable to physically unplugging all other drivers from your machine to prevent data loss during the installation. Better be safe than sorry!
Since I plan to use FreeBSD with GNOME as my daily driver, I will install the OS on a 200GB SSD.
Plug-in the FreeBSD installation USB stick and reboot your machine.
Launch The FreeBSD Installer
When your computer starts, make sure you quickly type the hotkey assigned to the Boot Menu to select the FreeBSD USB as a startup boot device.
The Boot Menu is usually assigned to F10, F11, or F12 keys – depending on your motherboard manufacturer.
Alternatively, you can select the default boot device in your Bios.
I’m using a Gigabyte motherboard with the F11 key assigned to the Boot Menu and the Del key to the Bios.
On the Boot Menu, select to boot from USB. If everything is right, you will be greeted by the FreeBSD Welcome screen.
Select 1. Boot Multi User [Enter]
On the FreeBSD Welcome screen, select Install [Enter]
On the Keymap Selection, use the arrow keys to select your keyboard layout [Enter]. I am using a US keyboard, so that I will choose the United States of America keymap. Once you set your keymap, click on Continue with <your keymap> then [Enter].
In the Set Hostname window, type your desired hostname and select OK [Enter].
In the Distribution Select window, Choose the optional system components to install: support for 32-bit libraries, ports, system resource tree, system & kernel debugging, and test suite.
Let’s select the 32-bit support, ports, and source tree for this install – check the lib32, ports, and src.
In the Partitioning window, we can select the Entire Disk or Partition on a disk. I am using the whole disk for my FreeBSD install so I’m going to select the Entire Disk option.
Next, the FreeBSD partition manager will provide us with four options as folowing:
- Auto (UFS) – Guided Disk Setup will automatically format your disk using the Unix File System.
- Manual – Manual Disk Setup (experts) will allow you to partition your disk manually via GUI. This option assumes that you already know what you’re doing.
- Shell – Open a shell and partition by hand. Again, this assumes you are not new to manual partitioning, and you know what you are doing.
- Auto (ZFS) – Guided Root-on-ZFS if you want to use pooled storage via multiple discs. You can read more about the Z File System (ZFS) in this excellent article by it’s foss.
Select Auto (ZFS) – Guided Root-on-ZFS [Enter] to use the ZFS file system. Alternatively, you can use the Auto (UFS) – Guided Disk Setup. I like keeping things interesting, so I’ll use ZFS in this install.
On the ZFS Configuration window, you can increase the Swap Size and enable Disk Encryption if you need it. I will proceed with the defaults and select >>>Install [Enter].
You can configure mirroring or RAID on the ZFS Configuration (Virtual Device type) window if you use multiple disks. I use only one disk in this setup, so I’ll select Stripe – No Redundancy option. Select OK [Enter] to continue.
Select the disk you want to install FreeBSD. I use a SAMSUNG SSD aaand the disk ID is ada0, so I will select it and chose OK [Enter].
FreeBSD Installer will now warn you this is the Last Chance to review your settings before proceeding with disk partitioning.
Once you select YES, all your data on this disk will be lost! If you are not sure, chose NO, and review your settings. If you feel confident, go ahead and select YES [Enter].
The FreeBSD installer will proceed with the disk partitioning and system installation.
Setting The ROOT Password
Next, you will be prompted to type a password for the system management account (root). If you plan to use this system on production, make sure you type a strong password for your root account.
On the Network Configuration window, select your network interface. I’m using the EDUP Dual Band Wireless USB in my system, and the FreeBSD installer detects the wifi interface without any additional configuration.
Select Yes [Enter] when asked to configure IPv4 for your interface.
Select Yes [Enter] when the installer asks you to configure DHCP for your interface.
Note: I don’t plan to use IPv6 in this system, so I will select No [Enter]. If you intend to use IPv6, configure the interface when prompted.
On the Time Zone Selector, choose your region, country, and city. Click OK [Enter].
On the Time & Date windows, you can select Skip [Enter] if your FreeBSD system will be connected to the Internet. Set-up the Time and Date if you plan to use this system offline.
On the System Configuration window, we can choose which services you would like to start during the boot. I usually leave the default settings here. Don’t worry. You can change these settings later – if needed. Click OK [Enter].
On the System Hardening window, you can select additional security options to reduce any system vulnerabilities. I use the following settings here. You can adjust the hardening level later – if needed.
Click OK [Enter].
Add User Accounts
Next, you will be asked to add a new user to your FreeBSD system. This is your everyday user account.
Select Yes [Enter] when prompted.
Fill in the items in red with your own details and press the Enter key for the rest, as shown below.
Username: <your username>
Full name: <your full name>
UID (Leave empty for default): [Enter]
Login group: [Enter]
Login group is <xyz>. Invite <xyz> into other groups? [ y]: wheel video operator
Login class [default]: [Enter]
Shell (sh csh tcsh nologin) [sh]: [Enter]
Home directory [/home/<xyz>]: [Enter]
Home directory permissions: [Enter]
Yous password-based authentication? [Yes]: [Enter]
Use and empty password? [no]: [Enter]
Use a random password? [no]: [Enter]
Enter password: <enter your user password>
Enter password again: <confirm your password>
Lockout the account after creation? [no]: [Enter]
OK? (yes/no): Yes
Add another user? (yes/no): No
Your username creation process should look like this:
On the Final Confirmation window, you have the chance to review your settings once more before completing the installation process. If everything’s right, Select OK [Enter].
In case you need to make any additional changes to your installation via a shell, you can do it in the Manual Confirmation window here. Otherwise, click No [Enter].
Your FreeBSD installation is done. Remove the FreeBSD install USB stick from your computer. Select Reboot [Enter].
Congratulations! You installed FreeBSD successfully on your machine.
Step 4: FreeBSD Post-installation Tasks
Your machine will boot into the now-familiar FreeBSD Welcome screen. Chose the first option (1) Enter multi-user mode [Enter].
FreeBSD doesn’t come with any Desktop Environment / Window Manager installed by default, so we will be greeted with just a login prompt.
But worry no more. We are just a few steps away from getting into GNOME Desktop Environment ready for use on our machine.
Log in as root using the root password you configured during the installation.
Updating The System
Like in any other system, after a fresh install, the very first thing we need to do is to update the system.
First, we will inspect the system for package versions and fetch the necessary updates using the following command:
A list of packages will appear on the terminal. Press the Enter key (or the Page Down key) until the end of the list and press the q key to exit.
Next, let’s install the updates by typing the following command:
The FreeBSD system is now up to date.
Install NANO Command-Line Text Editor
Note: If you are familiar with vi command-line text editor, you can skip this step.
To install nano on your FreeBSD system, type the following in the terminal:
pkg install nano
Nano is now installed in your system.
Install & Configure Sudo
Sudo is a program for Unix-like operating systems that allows a user to use the privileges of another user to run a program. For instance, it is considered unsecured to use the root account on an operating system on a routine basis. Instead, we can use the root privileges to run tasks that require user elevation (software installations, OS updates, etc.).
To install sudo, type in the terminal:
pkg install sudo
To make sudo work, we will need to edit sudoers file using the visudo command in the terminal:
Once vi shows up, use your down arrow to navigate to the line that says root ALL=(ALL) ALL and add below the following:
<your username> ALL=(ALL) ALL
This is how your input should look like in the sudoers file where “leonard” is my username.
Note: the visudo command uses the vi editor to edit the sudoers file. Use the “i” key (without quotes) to switch to edit mode, edit the file, and push the ESC key once to exit the edit mode. To save your changes, type “:wq!” (without quotes) and press the [Enter] key.
Sudo is now installed in your system.
Step 5: Installing GNOME Desktop Environment
There are a few ways to install the X servers and a DE/WM in FreeBSD. For instance, you can use the desktop-manager as explained in this guide.
We will install GNOME on FreeBSD the manual way as the method is pretty straightforward.
In the terminal, type:
pkg install gnome-desktop gdm xorg gnome3
This process will take a while, depending on your internet speed.
Grab a cup of coffee or tea in the meantime.
Once the required packages are installed, proceed to the next step.
Enable dbus, hal, mouse, gdm daemons
Because FreeBSD is installed without an X server, none of the daemons required by X are sunning on startup. Type the following command in the terminal:
Next, add the following lines in the rc.config file:
Your rc.conf file should look like this:
Save and exit the rc.conf file.
Mount /proc in fstab
Next, let’s make sure our filesystem is mounted at the startup. To do that, issue the following command in the terminal:
Add the following line in the fstab file:
proc /proc procfs rw 0 0
Your fstab file should look like this. Note: You can use the TAB key to space/align the parameters.
Save and close the fstab file.
Boot into GNOME Desktop
Now is time to see if our FreeBSD installation boots directly into the GNOME Desktop Environment. Type in the terminal:
If everything went well, you should be greeted by the GDM Login Manager.
Log in using your username and password when prompted.
Voila! Your rock-solid FreeBSD with Gnome Desktop Environment is now installed and ready for use.
You can also look at How to install FreeBSD with KDE Plasma guide, or if you are a fan of XFCE and look for a lighter desktop, check the guide on How to install FreeBSD with XFCE Desktop Environment here.
If you run into trouble following this guide or have any suggestions to improve this guide, please leave me a message in the comment section below.