How to check Linux OS version

How to check Linux OS version

 

You can use different commands to check the Linux OS version. Follow the below steps to check the installed OS version on CentOS / Redhat servers.
 
 

How to check OS version on CentOS, Redhat and Fedora servers

 
1. Log into your CentOS, Redhat or Fedora server via SSH as ‘root’ user or as sudo user

2. Run any of the below commands to check the OS version of your CentOS Redhat server
 

Command 1 : cat /etc/redhat-release

 

How to check CentOS redhat fedora version

How to check CentOS Redhat Fedora OS version


 

Command 2 :cat /etc/os-release

 

How to check OS version centos redhat fedora

How to check OS version of CentOS Redhat Fedora servers


 

Command 3 : cat /etc/centos-release

 

How to check OS version CentOS Redhat fedora

How to check OS version of CentOS Redhat Fedora server


 

Command 4 :lsb_release -a

 

How to check OS version CentOS Redhat Fedora

How to check OS version of CentOS Redhat Fedora Servers


 
3. If package ‘redhat-lsb-core’ is installed, you can use the command ‘lsb_release -a’ to check the OS version
 
 

How to check OS version on Debian and Ubuntu servers

 
1. Log into your Debian or Ubuntu server via SSH as ‘root’ user or as sudo user

2. Run any of the below commands to check the OS version
 

Command 1 : cat /etc/lsb-release

 

How to check Ubuntu Debian OS version

How to check Ubuntu Debian OS version


 

Command 2 : cat /etc/os-release

 

How to check Ubuntu Debian OS version

How to check Ubuntu Debian OS version


 

Command 3 : cat /etc/issue

 

How to check Ubuntu Debian OS version 3

How to check Ubuntu Debian OS version 3


 

Command 4 : lsb_release -a

 

How to check OS version debian ubuntu

How to check OS version debian ubuntu


 
Command 5 : cat /etc/issue.net
 

# cat /etc/issue.net
Ubuntu 18.04.4 LTS

 
 

How to check Linux kernel Version

 
1. Open the terminal

2. Log into your Linux server via SSH as ‘root’ user or as sudo user

3. Run the command ‘uname -r’ to check the Kernel release
 

# uname -r
4.4.0-142-generic

OR

# uname --kernel-release
4.4.0-142-generic