http://www.perlmonks.org?node_id=578431


in reply to (OT) command for finding out which distribution of Linux is being used

The following will give you the redhat version:
$ cat /etc/redhat-release
Similarly, on fedora it is:
$ cat /etc/fedora-release
HTH! That's not really perl-related, though. You might want to ask this type of question in the chatterbox, in the future.
  • Comment on Re: (OT) command for finding out which distribution of Linux is being used

Replies are listed 'Best First'.
Re^2: (OT) command for finding out which distribution of Linux is being used
by wazoox (Prior) on Oct 16, 2006 at 06:47 UTC
    And just in case, for Debian and related distributions, the release information is stored into
    /etc/debian_version
    And slackare uses
    /etc/slackware-version
      And just in case, for Debian and related distributions, the release information is stored into

      And FWIW in CRUX I can use the crux command, which in turn is a script which just echoes the wanted info, hardcoded there. The lesson to be learnt here is that not only the question has nothing to do with Perl, but also that it is one that hardly has an answer, since it's up to each distro to provide that info, and each distro provides it, or possibly doesn't, in its own way, i.e. there appears not to be a standard.

      However as fenLisesi++ points out, some more info seems to be available in /proc/version, specifically in the C compiler description: I've now checked 6 systems which comprise 4 different distros, namely CRUX, Mandriva, Debian and Gentoo; but I don't have the slightest idea how all this may be in general - and there are far many more distros out there...

Re^2: (OT) command for finding out which distribution of Linux is being used
by heidi (Sexton) on Oct 16, 2006 at 05:40 UTC
    thanks for the answer. as you said, i will ask such questions in chatter box henceforth. thanks again.