To find the version of the Linux kernel that is installed on an Ubuntu system, you can use the uname
command with the -r
flag, which displays the kernel release number. For example:
uname -r
This will display the version number of the kernel that is currently running on the system.
You can also use the ls
command to list the contents of the /lib/modules
directory, which contains the kernel modules that are loaded into the kernel at runtime. The subdirectories in this directory correspond to the different kernel versions that are installed on the system:
ls /lib/modules
This will show you a list of directories that are named after the different kernel versions that are installed on the system. The directory with the highest version number is the one that corresponds to the current kernel.
Alternatively, you can use the cat
command to display the contents of the /proc/version
file, which contains information about the kernel version and the distribution that it belongs to:
cat /proc/version
This will display a string that contains the kernel version number and other information about the kernel and the distribution.