How to view the kernel on MacOS? How to view the kernel on MacOS?

I am learning Linux command line by William Shotts,

The Kernal directory can been accessed by :

ls /bin 
# Contain Linux kernal, inital RAM disk image


How to view the kernel on MacOS?

$ ls /boot
ls: /boot: No such file or directory
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