Name

os-release — Operating system identification

Synopsis

/etc/os-release

Options

The following OS identifications parameters may be set using /etc/os-release:

NAME=

A string identifying the operating system, without a version string, and not necessarily suitable for presentation to the user. If not set defaults to Linux. Example: NAME=Fedora or NAME="Debian GNU/Linux".

VERSION=

A string identifying the operating system version, excluding any name information and suitable for presentation to the user. Example: VERSION=15 or VERSION="15 (Rawhide)".

ID=

A lower-case string identifying the operating system, excluding any version information and suitable for processing by scripts. If not set defaults to linux. Example: ID=fedora.

VERSION_ID=

A lower-case string (mostly numeric) identifying the operating system version, excluding any name information and suitable for processing by scripts. Example: VERSION_ID=15.

PRETTY_NAME=

A pretty operating system name in a format suitable for presentation to the user. May or may not contain an OS version of some kind, as suitable. If not set defaults to Linux. Example: PRETTY_NAME=Fedora 15 (Rawhide).

ANSI_COLOR=

A suggested presentation color when showing the distribution name on the console. This should be specified as string suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code for setting graphical rendition. Example: ANSI_COLOR=0;31 for red, or ANSI_COLOR=1;34 for light blue.

If you are reading this file from code or a shell script to determine the OS or a specific version of it, use the ID and VERSION_ID fields. When looking for an OS identification string for presentation to the user use the PRETTY_NAME field.

Note that operating system vendors may choose not to provide version information, for example to accommodate for rolling releases. In this case VERSION and VERSION_ID may be unset. Applications should not rely on these fields to be set.