8

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
1
  • Note Linux is not unix and commands will differ from macOS. Use a MacOS based tutorial. – Mark 1 hour ago
    – mmmmmm
    Mar 22, 2018 at 19:11

1 Answer 1

15

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 
1
  • 1
    The second location works for OS10.11 El Capitan.
    – lhf
    Mar 22, 2018 at 18:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .