Translate

Archives

Determining Linux Distribution Name and Release

One of the most annoying things about Linux is the inability to easily determine the name and release number of a Linux distribution from with an application. No, contrary to what a lot of people think, uname does not provide either of these bits of information. The best place to find this information is in the /etc/distribution-release file where distribution is replaced by the name of the distribution. This file should contain a single line in the format: Distribution release x.x (Codename) where distribution can be a single word like CentOS or a few words like Red Hat Enterprise Linux.