How To Find Out FreeBSD Version and Patch Level Number nixCraft Updated Tutorials/Posts

How do I find out my FreeBSD server version and patch level of the installed system using command line option? Can you tell us command to find out FreeBSD version and kernel patch level?

Introduction : You can use any one of the following command to display the FreeBSD operating system version and patch level

Unix commands to find out FreeBSD Version

  1. freebsd-version – Display the FreeBSD version and patch level of the installed system
  2. uname -mrs – Get information about the system including FreeBSD version

Let us see all commands in details.

How to find out FreeBSD version using freebsd-version command

The freebsd-version command appeared in FreeBSD version 10.0 and aboce. To see the FreeBSD server version and patch level of the installed kernel:
freebsd-version -k
To see the version and patch level of the installed userland:
freebsd-version -u

Fig.01: freebsd-version and other commands in action to display FreeBSD version
Fig.01: freebsd-version and other commands in action

How to use freebsd-version command from Live CD

Boot from a live FreeBSD CD/DVD. To see a system being repaired using a live CD:
mount -rt ufs /dev/ada0p2 /mnt ## assuming it is ufs ##
env ROOT=/mnt /mnt/bin/freebsd-version -ku

How to find out if I am using 32 or 64 bit FreeBSD kernel

You can also use the following command to find out if FreeBSD kernel is running in 32bit or 64bit mode:
# getconf LONG_BIT
Sample outputs:

64

Display FreeBSD version using old good uname command

Type the following command (it works on all versions of FreeBSD):
umame -a
uname -mrs

Outputs:

FreeBSD 11.2-RELEASE-p4 amd64

Understanding uname command options on FreeBSD

-aBehave as though the options -m, -n, -r, -s, and -v were specified.
-iDisplay the kernel ident.
-KFind the FreeBSD version of the kernel.
-mShow the type of the current hardware platform.
-nWrite the name of the system to standard output.
-oThis is a synonym for the -s option, for compatibility with other systems.
-pFind the type of the machine processor architecture to screen
-rGet the current release level of the operating system.
-sFind the name of the operating system implementation to monitor.
-UShow the FreeBSD version of the user environment.
-vWrite the version level of this release of the operating system.

Conclusion

This page showed you several ways to check kernel version and patch level in FreeBSD using the shell prompt. For more info see this page here and here.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Facebook Comments
Spread the love

Posted by News Monkey