How to check os version in Linux command line
There are several ways to check the operating system version in the Linux command line. Here are a few common methods:
- Using the
lsb_releasecommand:
lsb_release -aThis command displays detailed information about the Linux distribution, including the version, release number, and codename.
- Using the
/etc/os-releasefile:
cat /etc/os-releaseThis file contains information about the operating system, including the version and name.
- Using the
unamecommand:
uname -rThis command displays the kernel version, which can give you an indication of the operating system version.
- Using the
cat /proc/versioncommand:
cat /proc/versionThis command displays detailed information about the kernel, including the operating system version.
These are a few common methods for checking the operating system version in the Linux command line. Depending on your specific distribution, one of these methods may provide more detailed information than the others.
