Sometimes it can be difficult to know which version of FreeBSD to choose. In this article, we will learn in a simple way what features each version has and in which cases we should choose one or the other.
We can find all the documentation on the FreeBSD website, but here is a brief summary as a reference.
FreeBSD has two development branches, FreeBSD-CURRENT and FreeBSD-STABLE, as well as two stable branches, FreeBSD-RELEASE Production and FreeBSD-RELEASE Legacy.
We must bear in mind that these branches ONLY affect the core tools and kernel of the OS, not the rest of the applications that we can install later from binaries or the ports system.
CURRENT:
FreeBSD-CURRENT is the development branch where experimental functionalities and beta software are tested.
It should only be used by OS developers or developers who actively test software.
STABLE:
FreeBSD-STABLE is the development branch from which RELEASEs are released.
It is still a development branch NOT suitable for the end user, they have simply polished it a little more than CURRENT.
Snapshots are small patches with bugfixes that are applied to CURRENT and STABLE versions before releasing the final version of those branches of the OS.
FreeBSD-RELEASE Production:
Production release is considered stable with relatively modern versions of core tools and kernel.
FreeBSD-RELEASE Legacy:
Legacy release is also stable but more conservative than the Production release in terms of versions of core tools and kernel.
We can see the support for each of them here .
* Production Release: 12.0 June 30, 2020 (TBD)
* Legacy Release: 11.2 September 30, 2021
Regarding the rest of the software that is not part of the CORE of the system, we have two options: binary packages or ports system, in both cases we can choose different software versions:
- Quarterly: These are highly tested versions in which security flaws and bugs are updated. It is called quarterly because they are generated from the HEAD branch of the repository every 3 months: January/April/July/October, and are named according to the year and quarter of the year in which they were generated: YYYY-(Q1-4).
- Latest(HEAD): These are the latest available software versions.
As we have already said, we can choose between quarterly or latest whether we use binary packages or ports, but we must bear in mind that if we are going to mix binary packages with ports, we will have to configure both systems in the same way to avoid compatibility problems between libraries and others.
Next, we indicate how to configure the two systems in Quarterly and Latest.
Binary packages:
By default, the system is already configured to use the Quaterly repositories:
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
To switch to Latest:
cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf
Edit the file /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
Update the pkg indexes to the Latest version:
Ports system:
The first thing we need to know is that the portsnap tool only allows us to use the HEAD branch, for this reason we are going to use Git since it will allow us to use both HEAD and Quaterly.
Compile Git:
make install clean
We clone the main branch which is HEAD:
If we want to clone a quarterly, we just need to indicate it:
We can query the available releases:
...
origin/2023Q2
origin/2023Q3
origin/HEAD -> origin/main
origin/main
We ensure that we are in the correct one:
main
We can change to any of the available releases using the switch command:
git -C /usr/ports rev-parse --abbrev-ref HEAD
2023Q3
If we want to return to HEAD release that is main:
git -C /usr/ports rev-parse --abbrev-ref HEAD
main
Every time we want to update the repository, we will run the following command:
It should be noted that any combination of OS version and package system can be used. For example, we can choose to have a super stable base system with RELEASE-Legacy but more modern software compiled from ports using the latest branch.