This post demonstrates how to upgrade FreeBSD version 11.x to v12.
Upgrade FreeBSD v11 to v12
Step 1: Prerequisites
To see what version you’re currently using, issue the command below:
$ uname -mrs
The output reveals we’re using version 12.2 as the latest, but the following commands let you upgrade the kernel anyway. Next, type in the command below, and press enter:
Then, use the pkg command to update any or all packages.
Step 2: Upgrade FreeBSD using the Binary Method
Use the freebsd-update command below to update using the binary method:
The command above examines the configuration file. It’ll ask permission to make changes, so press y when it does.
With the downloads and configurations are taken care of, we’ll now change the disk properties. Enter the command below:
Then restart the system:
Upon a successful reboot, make sure the system is back online and use the command below to get rid of the old files and continue with the upgrade:
With the base system updated, update all the binary packages with the command below:
Then check the following directory:
Step 3: Verifying the Update
First, verify if every service is active:
$ sockstat -l
$ sockstat -4
$ sockstat -6
$ netstat -a -n | grep LISTEN
Make sure the log file isn’t encountering any errors while using the various command line utilities:
$ egrep -i 'err|warn|cri' /var/log/messages
Check the current version:
This post illustrated how to upgrade FreeBSD v11 to 12 with the binary package method. Although FreeBSD 11.2 has not ended its support, it is better to upgrade to version 12. With every upgrade, the FreeBSD kernel is made more resource-efficient and faster.