check the os version in linux code example
Example 1: how to check linux os
cat /etc/os-release
or
hostnamectl
Example 2: cat /etc/os-release
cat /etc/os-release
Example 3: how to find distro name
cat /etc/os-release
lsb_release -a
hostnamectl
Type the following command to find Linux kernel version:
uname -r