Identifying the Running Kernel

If you build several custom kernels, you might forget which kernel you’re running. The uname(1) command will tell you the name of the kernel configuration file used to build the running kernel. The -v flag will tell you the name of your kernel configuration and the number of times you have compiled it.

# uname -v
GENERIC.MP#348

This output does not mean that I’ve built a multiprocessor GENERIC kernel 348 times. I use the GENERIC kernel, and I let the OpenBSD release engineers build my kernels for me. They have built 348 official snapshot multiprocessor kernels without wiping the kernel build directory. Remember that building custom kernels is for advanced programmers and ignorant newbies. I’m neither.

Get Absolute OpenBSD, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.