Kernel: use sysctl kern.version. It provides the first two lines of your dmesg.
Userland: you can use file(1), ls(1) in combination with which(1), etc.
If you use the -stable branch, you can be sure to pick up all patches at the time of your build. And if you have multiple platforms of the same architecture, you can make your own binary release of -stable for quick updates of those machines.
See FAQ 5.1 on the -stable branch, and the release(8) man page. Other parts of FAQ 5 can be helpful for building -stable and creating a release.
|