[plt-scheme] OS version?
Eli Barzilay wrote:
>Does anyone know a portable way of getting the distribution and
>version of a linux machine? Specifically, I don't know of any way to
>get the version of Debian/Ubuntu machines.
>
>(The best hack I found so far is pretty bad: "cat /etc/issue.net"...)
>
>
>
There's no standardised way to find this, but each distro keeps its
accounting information somewhere different. My ubuntu system has:
ubuntu:~# cat /etc/debian_version
3.1
but from memory true debian systems will keep some version information
in /etc/apt/apt.conf.
Major distributions often alter uname -a to report the distro name as
well as the kernel version. This of course fails if someone customises
their kernel.
root at ubuntu:~ # uname -a
Linux ubuntu 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux