Changeset View
Changeset View
Standalone View
Standalone View
bin/freebsd-version/freebsd-version.1
Show All 28 Lines | |||||
.Dt FREEBSD-VERSION 1 | .Dt FREEBSD-VERSION 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm freebsd-version | .Nm freebsd-version | ||||
.Nd print the version and patch level of the installed system | .Nd print the version and patch level of the installed system | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl kru | .Op Fl kru | ||||
.Op Fl j Ar jail | |||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility makes a best effort to determine the version and patch level | utility makes a best effort to determine the version and patch level | ||||
of the installed kernel and / or userland. | of the installed kernel and / or userland. | ||||
.Pp | .Pp | ||||
The following options are available: | The following options are available: | ||||
.Bl -tag -width Fl | .Bl -tag -width Fl | ||||
Show All 10 Lines | |||||
Unlike | Unlike | ||||
.Xr uname 1 , | .Xr uname 1 , | ||||
this is unaffected by environment variables. | this is unaffected by environment variables. | ||||
.It Fl u | .It Fl u | ||||
Print the version and patch level of the installed userland. | Print the version and patch level of the installed userland. | ||||
These are hardcoded into | These are hardcoded into | ||||
.Nm | .Nm | ||||
during the build. | during the build. | ||||
.It Fl j Ar jail | |||||
Print the version and patch level of the installed userland in the | |||||
given jail specified by | |||||
.Va jid | |||||
or | |||||
.Va name . | |||||
.El | .El | ||||
.Pp | .Pp | ||||
If several of the above options are specified, | If several of the above options are specified, | ||||
.Nm | .Nm | ||||
will print the installed kernel version first, then the running kernel | will print the installed kernel version first, then the running kernel | ||||
version, and finally the userland version, on separate lines. | version, next the userland version, and finally the userland version | ||||
If neither is specified, it will print the userland version only. | of the specified jail, on separate lines. If neither is specified, it | ||||
will print the userland version only. | |||||
.Sh IMPLEMENTATION NOTES | .Sh IMPLEMENTATION NOTES | ||||
The | The | ||||
.Nm | .Nm | ||||
utility should provide the correct answer in the vast majority of | utility should provide the correct answer in the vast majority of | ||||
cases, including on systems kept up-to-date using | cases, including on systems kept up-to-date using | ||||
.Xr freebsd-update 8 , | .Xr freebsd-update 8 , | ||||
which does not update the kernel version unless the kernel itself was | which does not update the kernel version unless the kernel itself was | ||||
affected by the latest patch. | affected by the latest patch. | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |