[PLUG] Checking Linux Flavor

Roderick A. Anderson raanders at acm.org
Mon Jul 11 23:18:51 UTC 2005


On Mon, 11 Jul 2005, Carlos Konstanski wrote:

> Why not use the tried-and-true "cat /proc/version" and then cook up a
> regex to extract the distro name?

# cat /proc/version

Linux version 2.6.8-1.521 (bhcompile at tweety.build.redhat.com) (gcc version 
3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Mon Aug 16 09:01:18 EDT 2004

# cat /etc/redhat-release

Fedora Core release 2 (Tettnang)

# ls -l /etc/*release*

-rw-r--r--  1 root root 33 May 11  2004 /etc/fedora-release
lrwxrwxrwx  1 root root 14 Nov 11  2004 /etc/redhat-release -> 
fedora-release

I prefer this cat /proc/version but now see a slight problem with the 
Fedora Core stuff.

I'll give CentOS a shot tonight.


Rod
-- 
    "Open Source Software - You usually get more than you pay for..."
     "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"





More information about the PLUG mailing list