Find Linux version you are running using the command line

Julio Franco

Posts: 8,918   +1,841
Staff member
As you probably know, there are many distributions and variants of Linux out there, to name a few: Ubuntu, Arch Linux, Fedora, CentOS, openSUSE, Linux Mint, Elementary OS, Tails. It can be useful to know what OS version and distro you are running for patching and security purposes.

Using the Linux terminal, use one of the following commands which will provide a different set of information:
  • cat /etc/os-release
  • cat /proc/version
  • hostnamectl
Untitled-2.png
 
D

DelJo63

Another common means is
/usr/bin/uname
which also works in Mac terminal and Windows Cygwin environments

On OS X however uname will always report Darwin.

A better command is sw_vers and it will show the OS X Version
 
Last edited by a moderator: