Update Patch Level Of FreeBSD Jails - 2023-12-06
In this example we have 14.0-RELEASE-p1
installed and want to update to
14.0-RELEASE-p2
.
First, check the current version of every jail:
$ for i in $(jls name); do sudo freebsd-version -j $i; done
[..]
14.0-RELEASE-p1
14.0-RELEASE-p1
14.0-RELEASE-p1
Then, run an unattended update on all jails:
$ for i in $(jls name); do sudo PAGER="cat" freebsd-update -j $i fetch install; done
PAGER
is usually set toless
which results in a dialog you have to close manually. Withcat
the output is just printed and everything continues without interaction.
Once the updates are done, restart all the jails.
Keep in mind: This command will stop all jails in the order as they appear in
/etc/jail.conf
. Once all of them are stopped, they are started again.
$ sudo service jail restart
Done.