[lug] What distro am I running?
jeffrey.haemer at gmail.com
Mon Mar 10 10:51:15 MDT 2008
My Ubuntu boxes have a file called /etc/lsb-release that looks like this:
> DISTRIB_DESCRIPTION="Ubuntu 7.10"
My Fedora 8 boxes have no such file, but have a directory, /etc/lsb-
release.d, with a bunch of 0-length files.
The SuSE 10.1 boxes have both. Their /etc/lsb-release.d is full of empty
files, and their /etc/lsb-release looks like this:
All three have a command called lsb_release(1). Here's what the command
LSB Version: :
No LSB modules are available.
Fedora 8 sticks release info into /etc/redhat-release. Other RH distros
have this, too, even if I have to do a minor amount of parsing on the
Fedora Core release 6 (Zod)
Fedora release 8 (Werewolf)
Red Hat Enterprise Server release 5.1 (Tikanga)
SuSE sticks version stuff into a multi-line /etc/SuSE-release, analogous to
Ubuntu's /etc/lsb-release, but with a different syntax.
> SUSE LINUX 10.1 (i586)
> VERSION = 10.1
So, is there an /etc/ubuntu-release? Of course not. But there is an
/etc/debian_version, which says
I can hand-craft and maintain a special-purpose script to puzzle it out, but
I thought I'd ask whether there's a simple, standard command, analogous to
uname, to tell me what the heck distro I'm running. I'd like to be able to
invoke it within scripts that do other, distro-specific stuff.
Jeffrey Haemer <jeffrey.haemer at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LUG