how to get the kernel version in linux code example Example 1: how to check kernel version in linux cat /proc/version Example 2: bash get kernel version $ cat /proc/version