[PLUG] Checking Linux Flavor

Carlos Konstanski ckonstan at lunarlogic.com
Mon Jul 11 22:50:25 UTC 2005


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

Carlos

On Mon, 11 Jul 2005, Steve D... wrote:

> Date: Mon, 11 Jul 2005 15:47:24 -0700
> From: Steve D... <blitters at gmail.com>
> To: "General Linux/UNIX discussion and help, civil and on-topic"
>     <plug at lists.pdxlinux.org>
> Subject: Re: [PLUG] Checking Linux Flavor
> 
> On 7/11/05, Terry Griffin <griffint at pobox.com> wrote:
>> If the distro is LSB compatible *and* if the LSB utilities are installed
>> you can do this:
>>
>>     lsb_release -d
>
> YMMV...  It seems a bit suspect on an older SuSE box.
>
> user at host:~/> cat /etc/SuSE-release
> SuSE SLES-8 (i386)
> VERSION = 8.1
> user at host:~/> lsb_release -d
> Description:    UnitedLinux 1.0 (i586)
>
>  It doesn't work at all on a standard FC2 box.  I don't have an FC3
> box handy.
>
> Steve D...
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list