Skip to main content

How to Get Linux Distro Name and Kernel Version from the Command Line

If you are using Linux as a development environment, to install a new utility, or for an almost infinite number of other reasons, it may be helpful to get the current version from the command line.

Get Current Ubuntu Version From Command Line

If you are an Ubuntu or Debian user, you can get the latest distro from the command line by running the following:


lsb_release -a

Get Current Distro Version from Command Line Redhat/CentOS/Fedora

CentOS and Fedora are based on Redhat. You can get the current distribution by issuing the following commands:


# CentOS ONLY
cat /etc/centos-release 

# CentOS/Redhat/Fedora
cat /etc/redhat-release 

Get the Current Linux Kernel Version from the Command Line

Sometimes it is helpful to find the latest kernel version of the Linux distro you are running. You can get this info by running:


uname -a

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *