Sample Header Ad - 728x90

How can I ascertain which kernel (not version; kernel) is in use?

3 votes
2 answers
877 views
I want to be able to ascertain what kernel is in use across modern, UNIX-derivative OSes. This appears feasible, considering that utilities like uname exist on multiple OSes with different kernels. However, if we consider the venerable uname to be a usable example, it soon fails at this: it prints “Darwin” on macOS, which isn't the name of the *kernel*. It's XNU. (macOS is, in effect, the DE running atop the Darwin OS). In contrast, uname on cpe:/o:fedoraproject:fedora:42 prints “Linux”, which is the name of the kernel, rather than the base of the OS (GNU's CoreUtils). That kind of inconsistency renders it unreliable for this. My goal might seem niche, because it is. However, if I've got a system running macOS, another running Hurd-based Debian , and another running Linux-based Fedora, what tool can I utilise to ascertain the kernel in use? (I suppose I could just look in /boot/efi?)
Asked by RokeJulianLockhart (541 rep)
Aug 3, 2025, 02:57 PM
Last activity: Aug 4, 2025, 01:21 AM