You can check if your Linux is Ubuntu or Redhat by using the command cat /etc/os-release. The ID field in the output will indicate the name of your Linux distribution, such as Ubuntu or CentOS. You can also check for the file redhat-release on Redhat machines.
Here are some other commands you can use to check your Linux version:
- lsb_release -d: Shows the current distribution and its version number
- lsb_release -a: Shows additional information about the distribution version, including the release number and codename
- uname -r: Shows the version of the Linux kernel that you're currently using
- uname -a: Shows the version of the Linux kernel, as well as additional details
- uname -i: Gives you the hardware-platform
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article