Main index | Section 1 | Options |
The following options are available:
| |
Print the version and patch level of the installed kernel. Unlike uname(1), if a new kernel has been installed but the system has not yet rebooted, freebsd-version will print the version and patch level of the new kernel. | |
| |
Print the version and patch level of the running kernel. Unlike uname(1), this is unaffected by environment variables. | |
| |
Print the version and patch level of the installed userland. These are hardcoded into freebsd-version during the build. | |
If several of the above options are specified, freebsd-version will print the installed kernel version first, then the running kernel version, and finally the userland version, on separate lines. If neither is specified, it will print the userland version only.
To determine the name (and hence the location) of a custom kernel, the freebsd-version utility will attempt to parse /boot/defaults/loader.conf and /boot/loader.conf, looking for definitions of the kernel and bootfile variables, both with a default value of "kernel". It may however fail to locate the correct kernel if either or both of these variables are defined in a non-standard location, such as in /boot/loader.rc.
ROOT | Path to the root of the filesystem in which to look for loader.conf and the kernel. |
/bin/freebsd-version -u
To inspect a system being repaired using a live CD:
mount -rt ufs /dev/ada0p2 /mnt env ROOT=/mnt /mnt/bin/freebsd-version -ku
FREEBSD-VERSION (1) | November 14, 2017 |
Main index | Section 1 | Options |
Please direct any comments about this manual page service to Ben Bullock.