How to list all Linux kernels in Ubuntu and how to check all available kernel version in Linux. You can check last kernel update in Linux and check previous kernel version in Linux using terminal. Let us learn how:
What Is Kernel In Linux In Simple Words
The kernel is a computer program at the core of a computer’s operating system and generally has complete control over everything in the system. It is the portion of the operating system code thatfacilitates interactions between hardware and software components.
A full kernel controls all hardware resources (e.g. I/O, memory, cryptography) via device drivers, arbitrates conflicts between processes concerning such resources, and optimizes the utilization of common resources e.g. CPU & cache usage, file systems, and network sockets.
The kernel is one of the first programs loaded on startup (after the bootloader) and henceforth handles the rest of startup as well as memory, peripherals, and input/output (I/O) requests from software, translating them into data-processing instructions for the central processing unit.
Linux/UNIX Based Systems have Monolithic Kernel. A monolithic kernel is an operating system architecture where the entire operating system is working in kernel space.
The monolithic model differs from other operating system architectures (such as the microkernel architecture) in that it alone defines a high-level virtual interface over computer hardware. A set of primitives or system calls implement all operating system services such as process management, concurrency, and memory management. Device drivers can be added to the kernel as modules.
Where Is The Kernel Image Located In Linux
There no universal standard, but the kernel is usually found in the /boot directory. Note that the Linux kernel image is conventionally named vmlinuz and stored under /boot but it can be given any name and stored at any location.
How To Check All Available Kernel Version In Linux
By default, all installed Linux Kernels and their associated files are stored under /boot directory named vmlinuz. To check all available Kernel version in Linux, run one of the following commands:
find /boot/vmli*
dpkg --list | grep linux-image
sudo dpkg ––list | egrep –i ––color ‘linux-image|linux-headers’
sudo dpkg ––list | egrep –i ––color ‘linux-image|linux-headers’ | wc –l
If you want to list all installed kernels on Ubuntu except current one, run the command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'
If you wann to print the name of the kernel currently being used and the date of installation and update, run the uname command with -sv options.