How do i find out which Fedora version I'm running from the cli (not uname -a)?

Solution 1:

This perhaps?

[dummyuser@d400 ~]$ ls -l /etc/system-release
lrwxrwxrwx. 1 root root 14 2009-06-04 19:05 /etc/system-release -> fedora-release

[dummuser@d400 ~]$ cat /etc/system-release
Fedora release 11 (Leonidas)

Solution 2:

Please see:

  • How do I find out what version of Linux is running?
  • How do I find out the distro of a server?
  • Determining type of Linux machine

Solution 3:

On modern systems you should be able to look in /etc/lsb-release

mojo-jojo david% cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu karmic (development branch)"

This should be the LSB mandated way of finding out the distribution across different Linux distributions.

You should not rely on /etc/issue, as it is used for the login message, and someone might change it.


Solution 4:

Even better, and *nixwide:

lsb_release -d

Solution 5:

I had to do

cat /etc/fedora-release