How to view the kernel on MacOS?
That depends on your version of macOS.

Previously the kernel XNU was locate at the root directory and named mach_kernel:

$ ls -la /mach_kernel


Apparently starting with 10.11 El Capitan and in mac OS 10.12 Sierra this file was moved and renamed:

$ ls -la /System/Library/Kernels/kernel