Find Your Linux Version

The CLI commands to find your Linux version are easy as pie, but they are also easy as pie to forget.  Let this post be your goto reminder.  To use these commands, simply open a terminal shell. Then type in any of the commans below.  Don’t type the dollar sign that’s preceding each command;  It just represents the shell prompt.

My Favorite Way

hostnamectl

KERNEL INFO

All Kernel Information

$ uname -a

Abbreviated Kernel Version

$ uname -r

DISTRIBUTION AND VERSION

$ lsb_release -a

or…

$ cat /etc/lsb-release

or…

$ cat/etc/issue.net

Also try…

Ubuntu

$ lsb_release -a

Debian

$ cat /etc/debian_version

CentOS

$ cat /etc/centos-release