How to Check Kernel Image Size?

How to Check Kernel Image Size?

Kindly tell me how to find size of the kernel image of Ubuntu that I installed on the Virtual Box.

2 Answers

All Kernel image files are located in /boot. To find out which one you are currently using, run
uname -r

As en example, on my Xubuntu 12.04 machine, if I run

xuser@esr:/boot$ uname -r
3.2.0-53-generic

Now, to check in /boot:

xuser@esr:/boot$ ls -lha /boot | grep 3.2.0-53-generic
-rw-r--r--  1 root root 782K Aug 23 00:13 abi-3.2.0-53-generic
-rw-r--r--  1 root root 145K Aug 23 00:13 config-3.2.0-53-generic
-rw-r--r--  1 root root  14M Sep  9 16:46 initrd.img-3.2.0-53-generic
-rw-------  1 root root 2.2M Aug 23 00:13 System.map-3.2.0-53-generic
-rw-------  1 root root 4.7M Aug 23 00:13 vmlinuz-3.2.0-53-generic

As you can see, my kernel image file is called vmlinuz-3.2.0-53-generic is 4.7 MB big. The initial RAM disk it loads has 14 MB.

This will give you the size in MB of the full set if you run it on the terminal:

du -cm /lib/modules/$(uname -r) /boot/vmlinuz-$(uname -r) /boot/System.map-$(uname -r) /boot/config-$(uname -r)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.