Install FreeBSD With KDE Plasma 5 [VirtualBox]

By Leonard Cucos •  Updated: 09/17/21 •  18 min read

In this guide, I am going to show you how to install FreeBSD with KDE the easy way using a script as well as how to find the software you need in the FreeBSD repositories.

I’ve been using FreeBSD for servers for a long time now. It is insanely stable, secure, and feels significantly faster than most Linux distributions I used. Lately, I was flirting with the idea of switching to FreeBSD with KDE as my daily driver. 

There are many reasons to choose FreeBSD over something else. Here are some that matter the most for me:

Installing FreeBSD with KDE from scratch usually takes anywhere between 1 to 2 hours and depends mostly on how fast your Internet speed is and how quickly you can follow this guide. 

Grab a cup of coffee and let’s get down to work. 

Step 1: Download The FreeBSD ISO

At the time of writing this post, FreeBSD 13.0 is the latest release. Head over to the official FreeBSD download page. Click on the amd64 link. 

NOTE: If you are using an old computer or different architecture [e.g., ARM], select the respective link in the list. 

Install FreeBSD - Download ISO. Source:

Click on the larger .iso file in the list. Alternatively, you can start the FreeBSD amd64 iso by clicking HERE.

Install FreeBSD with desktop environment: FreeBSD iso. Source:

Step 2: Prepare The FreeBSD USB Installer

If you follow this guide to install FreeBSD on a virtual machine, ship this step.

Download and install Balena Etcher and insert a USD stick of a minimum of 8 GB in your computer. All data on your USB stick will be deleted so make sure you don’t have important files on it. 

Once the FreeBSD download is completed, open Etcher and perform the following three steps:

  1. Click on Flesh from file, browse and select the FreeBSD iso you downloaded above.
  2. Click on Select target and make sure you select the USB stick you inserted earlier from the list of devices.
  3. Click Flesh! and relax for the next 10-15 minutes.  
Prepare FreeBSD install using Balena Etcher. Source:

Step 3: Boot On The FreeBSD USB Installer

A word of warning before we proceed with the installation. If you choose to dual-boot with another operating system, I would highly recommend you to leave only the drive you plan to install FreeBSD on connected to your computer and disconnect the others. Better be safe than sorry.

Assuming your computer is turned off, insert the FreeBSD USB installer and power on your machine. Launch the boot loader when the computer starts. 

I’m using a Gigabyte motherboard and in my case the function key is F12. Other systems may have F10 or F12 keys assigned to the boot loader. Alternatively, you can configure the boot loader order in your BIOS.

If everything is good, you should be seeing the Welcome to FreeBSD screen. Push the ENTER key or wait for 10 seconds for the installer to start.

Install FreeBSD - Boot loader. Source:

Step 4: FreeBSD Installation

Once the FreeBSD installer is loaded, on the Welcome window select Install [Enter].

Install FreeBSD - Welcome screen. Source:

NOTE: Use the keyboard arrows and the Tab key to navigate through the FreeBSD installation menu.

On the Keymap Selection window, choose your keyboard map. The default keymap in FreeBSD is the US so if you are an English speaker you won’t need to change anything. 

Once done, select Continue with… [Enter].

Install FreeBSD - Keymap Selection. Source:

On the Set Hostname window, type a name, e.g., freebsd for your hostname, and select OK.

Install FreeBSD - Set Hostname. Source:

On the Distribution Select window, make sure you select [spacebar] the ports and src as optional system components to install. Select OK and hit ENTER.

Install FreeBSD - Distribution Select. Source:

On the Partitioning page, you can choose to partition your disk automatically with ZFS, UFS or if you are an expert you can choose Manual Disk Setup or use the Shell to perform the disk partitioning by hand.

I am a big fan of ZFS [Z File System] and since I have only one disk in my system I will choose Auto (ZFS) this time. Select OK and hit Enter.

Install FreeBSD - Partitioning. Source:

On the ZFS Configuration window, you can mirror, encrypt or increase your swap size, encrypt your disk, or change the pool name among others. 

The default settings are sufficient for my needs so I will Proceed with Installation. Press the ENTER key to continue.

Install FreeBSD - ZFS Configuration. Source:

If you are not using Mirror or RAID configurations [requires multiple physical disks], select Stripe and OK [Enter] to continue.

Install FreeBSD - ZFS Configuration [mirroring]. Source:

Next, select [spacebar] the disk you want to install FreeBSD on, and OK [Enter] to continue to the next step.

Install FreeBSD with KDE - Select disk. Source:

The FreeBSD installer will warn you this is your last chance to review your settings before being written to your disk. All the existing data on the selected disk will be permanently destroyed. Choose YES [Enter] to proceed with the installation. 

Install FreeBSD with KDE - warning. Source:

The FreeBSD installer will now proceed to install the base, kernel, lib32, ports, and src system components. This step is performed very fast so you don’t need to take a break yet.

Install FreeBSD with desktop environment - Archive Extraction. Source:

Next, you will be asked to configure the root password. Type a strong password and confirm it when asked. 

On the Network Configuration window, choose your network device and select OK [Enter]. 

Install FreeBSD - Network Configuration. Source:

Next, the FreeBSD installer will ask you if you want to configure the IPv4 for your interface. Select Yes [Enter].

Install FreeBSD with KDE - Network Configuration IPv4. Source:

Similarly, choose Yes [Enter] when asked if you want to configure the DHCP for this network device.

FreeBSD installer - Network Configuration [DHCP]. Source:

When prompted to configure IPv6 for your network interface, select No [Enter].

FreeBSD installation - Network Configuration [IPv6]. Source:

The FreeBSD Network Configuration will automatically look for the DHCP server and configure your network interface with the appropriate settings. Select OK [Enter] to continue.

FreeBSD Installer - Network Resolver Configuration. Source:

On the Time Zone Selector window, choose your region and select OK [Enter]

Install FreeBSD - Time Zone Selector. Source:

Next, select your country. In my case, it is the United States of America. Select OK [Enter].

Install FreeBSD - Select Country. Source:

When prompted, select a zone that observes the same time as your locality. In my case, the nearest time zone is the Louisville area. Select OK [Enter] to continue.

NOTE: if you are prompted if your abbreviation ‘’ looks reasonable, choose Yes [Enter].

Install FreeBSD - Select Time Zone. Source:

Double-check if the FreeBSD installer detected your date and time correctly. Alternatively, you can skip this step and adjust the time and date later. Select OK [Enter].

FreeBSD Installer - Time & Date. Source:

On the System Configuration window, select [spacebar] which services you would like to start at boot. You can leave the defaults here or check additional settings such as system and network time, enable kernel dumps in case of a crash, or the PS2 mouse service. 

Install FreeBSD with desktop environment - System Configuration. Source:

FreeBSD is a secure system by default. But if you want to perform some extra-hardening, you can do so in the System Hardening window. 

My usual FreeBSD hardening settings are those included from options 5 to 10. If your computer is connected to a larger network, you can check all options. Once done, select OK [Enter].

Install FreeBSD with KDE - System Hardening. Source:

Next, we will proceed to create a normal user. Select Yes [Enter] on the Add User Accounts window

Install FreeBSD - Add User Accounts. Source:

On the Add Users terminal window, follow the instructions in the table below. You will be prompted step-by-step to insert user-related information. You can hit the ENTER key to choose the default settings.

Username:Type your desired username
Full Name:Type your name
Login Group:[ENTER]
Login Group is <username>wheel video operator
Login Class [Default]:[ENTER]
Shell (sh csh tcsh nologin) [sh][ENTER] to choose the sh shell.
Home directory [/home/<username>][ENTER]
Home directory permissions: [ENTER]
Your password-based authentication?[ENTER]
Use an empty password? [no][ENTER]
Use a random password? [no][ENTER]
Enter password:Type the password for your user
Enter password again:Confirm the password for your user
Lock out the account after creation? [no][ENTER]
OK? (yes/no)[ENTER]
Add another user? (yes/no)Type no in case you don’t want to add an additional user. Yes otherwise

Here is how your Add Users account creation section should look like. 

FreeBSD Installer - User Creation Example. Source:

On the Final Configuration window, you can review or change any settings you configured so far [excluding partitioning]. Once you select OK [Enter] the installer will start configuring the FreeBSD system accordingly. 

FreeBSD Final Configuration. Source:

And finally, we reached the end of the FreeBSD installation. If you want to perform any manual modifications to your system, you can choose to do so via a shell here. If everything is nice and dandy, choose No [Enter].

Install FreeBSD - Manual Configuration. Source:

That’s it! FreeBSD is now installed on your computer. All that is left now is to reboot the system. Select Reboot [Enter].

FreeBSD Installer - System Reboot. Source:

Once the system reboots, you should be greeted with the FreeBSD welcome screen. Hit the ENTER key and wait for the system to boot.

Launch FreeBSD - Welcome boot screen. Source:

If you are greeted by a login prompt, congratulations! You successfully installed FreeBSD on your computer. Login using your root account and type the root password when prompted.

Login FreeBSD superuser. Source:

FreeBSD does not provide any choice for a Desktop Environment [DE] or Window Manager [WM] during the installation. That doesn’t mean we can’t install a GUI. In fact, a plethora of DEs and WMs are available on FreeBSD. 

Step 5: Update FreeBSD

Let’s make sure our newly installed FreeBSD system is up-to-date before doing anything else. To check your system for updates, type the following command in the terminal:

freebsd-update fetch

FreeBSD will now check your system for updates and fetch the files to be updated. Press the Q key twice to exit the list. 

Update FreeBSD [fetch]. Source:

Now let’s instruct FreeBSD to install the updates by using the following command:

freebsd-update install

Very fast right? Your FreeBSD system is now fully updated. 

Step 6: Install KDE on FreeBSD

Alright. If you reached this step, I’m really proud of you! Now, let’s install a DE on our machine and make it usable for daily use.

There are a few ways to install KDE on FreeBSD. By far, the easiest way is using a little script called desktop-installer. 

The desktop-installer assists you in installing over a dozen DEs and WMs in an interactive way while performing all the necessary configurations without user input. The script will automatically detect your sound card and GPU card, download and install the necessary drivers. It will also install Xorg and assist you in testing it.

If you install FreeBSD with KDE on a virtual machine [VirtualBox, VMWare, Parallels, etc.] right now, the desktop-installer will automatically detect, install and configure all the necessary drivers and tools. Isn’t that amazing?

Desktop-installer script must be run as the superuser, so before you start make sure you are logged in as root.

To install the desktop-installer on your system, type the following command:

pkg install desktop-installer

FreeBSD will detect that we launch pkg [package manager] for the first time and will download and configure it for us. Type Y [Enter] to proceed with the pkg installation. 

FreeBSD with KDE - Install PKG. Source:

And again type Y [Enter] to proceed to install the required packages.

FreeBSD with KDE - Desktop Installer. Source:

Launch the desktop-installer script by executing the following command. 


Once the script is launched, read the instructions and press the ENTER key to continue. 

NOTE: You most likely have to reboot and re-run desktop-installer at least once or twice during this installation. The script will automatically remember [detect] the previous executed steps so you don’t have to go through the entire process again.

The default choice will be marked with [ ] and can be executed by pressing the ENTER key. The choices are not case sensitive.

Install KDE on FreeBSD - Desktop Installer [1]. Source:

Next, desktop-installer will provide you with additional information. Go ahead and read it and once done, press again the ENTER key.

Install KDE on FreeBSD - Desktop Installer [2]. Source:

Type 1 [Enter] for Just the essentials. If you are not a beginner, and want to have more granular access to the configuration [firewall, source packages, etc.] choose Advanced options

Install KDE on FreeBSD - Desktop Installer [Just The Essentials]. Source:

In the next screen, you can choose if you want to use the quarterly ports/packages or bleeding-edge. I prefer stability so I will leave the default N [Enter] to continue. 

NOTE: changing from quarterly to bleeding-edge or vice-versa is not an easy task, so make sure you know what you’re doing if you choose differently. 

Install FreeBSD with KDE - Desktop Installer [snapshots]. Source:

Type N [Enter] when prompted to create a shallow Git clone.

FreeBSD with KDE - Desktop Installer [replace ports]. Source:

When prompted to update and reboot the system, type N [Enter] as we have already updated in Step 5

Install FreeBSD with KDE - Desktop Installer [system update]. Source:

NOTE: In case you accidentally proceeded with the update, reboot the system, launch the desktop-installer. Choose n when prompted again to update and reboot the system. 

In the next screen, you can choose the DE or WM you want to install on FreeBSD. As you see, there are plenty of choices here. As in this guide, we plan to install FreeBSD with KDE, we will choose option 8 [Enter].

Install FreeBSD with desktop environment - KDE. Source:

If your system has a sound device, the script will detect it and ask if you want to configure it. If so, type Y [Enter].

Install FreeBSD with KDE - Desktop Installer [sound device configuration]. Source:

Next, the script will start the Xorg [display server], KDE, and SDDM [login manager] packages installed on your system. 

Press the ENTER key and take a well-deserved break. This step can take up to one hour, mainly depending on your Internet speed. There are no prompts during this step.

Install FreeBSD with desktop environment. Source:

Once you’re back, you will be prompted to reconfigure X11 and your desktop. Press ENTER to confirm the default option [y].

FreeBSD with KDE - Configure X11. Source:

Next, your GPU will be detected and graphic drivers installed. Press ENTER to confirm the default choice [y]

Install graphic driver on FreeBSD [Desktop Installer]. Source:

My machine is equipped with two Nvidia GTX 1070 graphic cards and they are both detected and configured without any issues. 

Once your graphic card is configured, it is time to test if X11 is working. This is an important step as if X11 doesn’t work, most likely KDE will not either. Hit ENTER to accept the default y.

Install FreeBSD with desktop environment - X11 test. Source:

Be patient as X11 tests can take up to one minute in some cases. During this time the resolution will likely change a few times. 

Voila! X11 and KDE work great. Now log off from KDE [do not reboot or shutdown] to return to the desktop-installer. 

Install FreeBSD - X11 and KDE. Source:


In case you get a black screen during this step, most likely your GPU is not yet supported and you will have to switch to a generic graphic driver. Press CTRL+ALT+F1 key combination to return to the terminal and reboot the system.

Boot as a single-user [FreeBSD boot screen] and once logged in execute the following commands in the terminal:

mount -u -o rw

followed by:

ee /etc/rc.conf

Remove the kms module [radenonkms, i915kms, etc.] from kld_list setting [or commend the line by adding # in front]. Save and exit the ee editor by pressing the ESC key to save and exit.

Reboot the system, run desktop-installer again and choose N when prompted to detect the graphic card.

The next section will configure the X11 forwarding over ssh [sshd daemon]. Type Y [Enter] to configure the X11 forwarding over ssh.

FreeBSD with KDE - X11 forwarding over ssh. Source:

Type N [Enter] to deny all forward X11 hosts for security reasons. 

FreeBSD with KDE - X11 inbound over SSH. Source:

Type N [Enter] to accept forwarded X11 displays from other hosts via ssh.

FreeBSD with KDE - X11 forwarded over SSH. Source:

Next, the desktop-installer script will configure the SDDM [login manager for KDE]. Press ENTER to continue.

Install FreeBSD with KDE and SDDM. Source:

Type Y [Enter] to enable the SDDM login.

Enable SDDM in FreeBSD with KDE. Source:

Press ENTER to test the SDDM. If you follow this guide in a virtual machine, use CTRL+ALT+F1 to return to the desktop-installer console. We are not yet done.

Test SDDM in FreeBSD with KDE. Source:

On the SDDM interface, click the Desktop Session drop-down menu and switch from Plasma (Wayland) to Plasma (X11). Wayland is not ready yet for prime time on FreeBSD and can cause many issues.  

Login in SDDM to test if the KDE is loading properly.  

FreeBSD with SDDM and KDE [X11]. Source:


If you experience display resolution issues in KDE at this point [especially in virtual machines], click on the KDE logo > Settings > System Settings > Display Configuration and adjust the resolution accordingly to your display. 

Once done, hold CTRL+ALT+F1 keys to return to desktop-installer to continue. We still have a few steps left.

Next, choose if you want bsdstats [telemetry] to be installed on your system. I will choose Y [Enter] to support the FreeBSD project to collect anonymous data to develop drivers and ports based on stats collected from the end-user. This is important to help FreeBSD grow its user base.

Install BSDstats on FreeBSD with KDE. Source:

In the next section, you will be asked if you want to install some common software on FreeBSD.

You can always install software from repositories or ports later.

Type Y [Enter] you want to install Mozilla Firefox on FreeBSD.

Install Firefox on FreeBSD [Desktop Installer]. Source:

Type Y [Enter] if you want Mozilla Thunderbird as your email client on FreeBSD. 

Install Thunderbird on FreeBSD [Desktop Installer]. Source:

If you need an office suite on FreeBSD, you can’t go wrong with LibreOffice. Type Y [Enter] to install it. 

Install LibreOffice on FreeBSD [Desktop Installer]. Source:

The VLC media player doesn’t need any introduction. If you want to install VLC on FreeBSD, type Y [Enter].

Install VLC on FreeBSD [Desktop Installer]. Source:

And finally, the desktop-installer will install the Desktop Admin – a script that allows you to update your system easily, perform user management or install additional software in FreeBSD. Type got it [Enter]. 

Install Desktop Admin on FreeBSD with KDE. Source:

And there it is. Your FreeBSD with KDE Plasma is now installed. On the Auto Admin screen type 4 [Enter] to shut down the system.

Desktop Admin interace on FreeBSD. Source:

Power on the machine and wait for the magic to happen. 

There you have it – FreeBSD 13 installed with KDE Plasma 5. And man, KDE looks and feels awesome on a FreeBSD system.

FreeBSD with KDE Plasma 5. Source:


If you installed FreeBSD in a virtual machine, make sure you are able to access the Internet. Open the terminal and run the following command:


If the command returns “Unknown Host,” the issue is likely related to the DNS configuration in FreeBSD and HERE is how to fix it in a few simple steps.

Step 7: Install SUDO on FreeBSD

We don’t want to switch to superuser each time we need elevated privileges in FreeBSD. Sudo is a quick way to execute specific commands that require elevation without having to become root. 

To install sudo on FreeBSD, open a terminal by clicking the KDE Logo > System > Konsole and type the command below. Enter your root password when prompted.

su -

Install sudo by executing the following command:

pkg install sudo

Next, we need to edit the sudoers file and add your user to it using the following command:


Use your keyboard arrows to navigate and find the line root ALL=(ALL) ALL in the file. Type the letter i to switch to the insert mode. 

Add the following line below the root ALL=(ALL) ALL, by replacing <your username> with your actual username.

<your username> ALL=(ALL) ALL
Install sudo on FreeBSD - add user sudoers. Source:

Once done, press the ESC key to exit the insert mode and type :wq! to save and exit the sudoers file.

stall sudo on FreeBSD - save sudoers file. Source:

Switch to the normal user by typing in the terminal:


BONUS: Install Additional Software in FreeBSD

The easiest way to install software on FreeBSD is to use the pkg utility or compile binaries from ports. But if you prefer to manage your packages using a GUI, read How To Install a GUI Package Manager in FreeBSD [OctoPkg].

To search for software using pkg, use the following command:

sudo pkg search <name of the package>
Install Kdenlive on FreeBSD with KDE. Source:

Above I did a search for kdenlive [a potent open-source video editor] using the pkg search command. Let’s go ahead and install kdenlive on FreeBSD.

sudo pkg install kdenlive

And here it is:

Launch Kdenlive on FreeBSD with KDE. Source:

To find out where Kdenlive is installed type the command:

whereis kdenlive
whereis Kdenlive on FreeBSD with KDE. Source:

To uninstall an application in FreeBSD type in the terminal the following command:

sudo pkg remove <name of the package> 
Remove Kdenlive package on FreeBSD. Source:

A great resource for FreeBSD software is the freshports. Here you can find everything you need, pkg, ports, applications, etc. Type what you’re looking for in the site’s search and copy/paste the installation commands in your terminal. Simple enough?

FreeBSD Freshports page. Source:

Wrapping Up

That’s it! You just installed FreeBSD with KDE Plasma 5 on your computer or on a virtual machine. You may also want to check how to install FreeBSD with XFCE and NVIDIA Drivers.

From here on, I guarantee you won’t get bored. Go ahead and try different desktop environments and window managers, customize them, install new software, and most importantly, be productive.

And if you tinker too much and run into issues, the FreeBSD documentation and forum will never disappoint you. 

FreeBSD with KDE has been such a smooth experience for me so far. My system is stable, secure, clean, and super-fast! Give it a try on real hardware and you won’t be disappointed. 

Leonard Cucos

Leonard Cucos is an engineer with over 20 years of IT/Telco experience managing large UNIX/Linux-based server infrastructures, IP and Optics core networks, Information Security [red/blue], Data Science, and FinTech.