View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Find out which linux distribution a system belongs to

From LQWiki

(Redirected from Find out your distribution)
Jump to: navigation, search

This page proposes to list methods to determine which distribution a system belongs to.

Contents

osinfo command

You can use the osinfo command to determine which distribution you use.

Version files

[ -e /etc/SuSE-release ] && echo This is a SuSE system.
[ -e /etc/redhat-release ] && echo This is a redhat system.
[ -e /etc/fedora-release ] && echo This is a fedora system.
[ -e /etc/debian-version ] && echo This is a debian system.
[ -e /etc/slackware-version ] && echo This is a slackware system.

Kernel version information

Commonly, distributions will leave tags in the kernel version string to identify themselves. This can be found in the log files like /var/log/syslog or /var/log/messages.

The Linux's version string can also be found in /proc/version, although here the tested system needs to be the one opening the /proc/version file ( i.e having its kernel running ).

Even if you run a custom kernel, you might still get hints from the gcc version like this one line from /var/log/syslog :

Feb 20 05:54:07 sarge kernel: nf3 (root@sarge) (gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-13sarge1)) #1 PREEMPT Thu Nov 16 20:31:43 CET 2006

External links


Personal tools