Determining Linux Release

Sergej Kandyla sk.paix at gmail.com
Tue Feb 3 20:25:00 UTC 2009


Hearn, Stan J. пишет:
> I need to determine the version of Linux in a script.
>
> I would prefer to use the uname command.  I use that currently for Solaris.  But that really only gives me the kernel version in Linux.  Right?
>
> With Redhat I could use the /etc/redhat-release, but would that work for other flavors like Fedora, CentOS, etc...?  Is there a standard for Linux based distros to use /etc/*-release to identify itself?
>   

cat /etc/*release /etc/*version 2> /dev/null
> Thanks,
> Stan
>
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>   




More information about the redhat-sysadmin-list mailing list