There are several ways of finding out what version of Linux you’re on. Whether it would be Debian 10 or CentOS 8, this should give you a good idea of what you are running. How can we see what version we’re running on?
There’s an easy way of finding out what version the Linux kernel is running on. All it takes is just one command that will display everything you need to know:
sudo uname -a
The uname program will display all information based on what has been defined in the arguments. The -a argument tells it to show everything related to the Linux kernel. You can also run it like this too:
sudo uname -v -r
This will display the current kernel release and version. Something like this can be important for determining vulnerabilities and the need to update manually.
There are a few ways you can display operating system information. Such information for example would be Debian 10 Buster or CentOS 7 or 8. One way would be to do it like this:
sudo cat /etc/os-release
Cat will display detailed OS information such as name, version, codename, and website URL. The os-release file contains operating system information for identification purposes. You can also run this command as well:
sudo lsb_release -a
A pretty straightforward output is displayed. This would be the better choice for most users as it shows you all the needed OS details. Last but not least, you can get straight to the point with this:
sudo cat /etc/issue.net
You should now have a pretty good idea of what your OS version is.