What is the vmlinuz file?

If you’ve ever looked into your Linux system’s /boot directory, you’ve surely come across a file with the mysterious name vmlinuz (or vmlinuz-6.5.0-generic, etc.). This is one of the most important files in the entire system – it’s the compressed, bootable image of the Linux kernel.

In short, this is the file that is loaded into memory by the bootloader (like GRUB) when the computer starts. Once loaded, a small piece of code inside vmlinuz decompresses the rest of the kernel into RAM and then transfers control to it, beginning the actual startup process of the operating system.