---
name: "os-release"
section: "5"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/os-release"
---

# os-release(5)

file describing the current OS and some of its attributes

## NAME

**os-release** – file describing the current OS and some of its attributes

## DESCRIPTION

The **os-release** file is a new-line separated list of key value pairs. The syntax of this file is a reduced [sh(1)](/sh/1.md) variable assignment with the following restrictions:

- Strings cannot be concatenated together

- No variable expansion is done

- All shell special characters must be quoted as documented in [sh(1)](/sh/1.md)

- Variable assignments must be included inside of double quotes if they contain characters outside of A-Z, a-z and 0-9

- All strings should be UTF-8 format

- Non-printable characters should not be used in the strings

Lines starting with the character ‘#’ are ignored as comments.

## VARIABLES

The following variables are defined by the standard.

- NAME

  A string describing the preferred OS name.

- VERSION

  Version string for the OS, in its usual and customary format.

- ID

  Lower case version of the name with only a-z, 0-9, ‘.’, ‘-’, and ‘\_’.

- VERSION\_ID

  Lower case version of the version with only a-z, 0-9, ‘.’, ‘-’, and ‘\_’.

- PRETTY\_NAME

  A pretty version of the name presented to the user. May contain release information.

- ANSI\_COLOR

  Suggested color presentation for the OS. This string should be suitable for inclusion within an ESC \[ m ANSI/ECMA-48 escape sequence to render the OS in its preferred color. This variable is optional.

- CPE\_NAME

  A CPE name for the operating system. This field shall follow the NIST Common Platform Enumeration specification.

- HOME\_URL

  - SUPPORT\_URL

  - BUG\_REPORT\_URL

  - PRIVACY\_POLICY\_URL

  Links on the internet, in RFC 3986 format for different aspects of this OS. These variables are optional.

- BUILD\_ID

  A string identifying the build. This variable is optional.

- VARIANT

  A string describing the variant of this operating system. This variable is optional.

- VARIANT\_ID

  Lower case version of the variant with only a-z, 0-9, ‘.’, ‘-’, and ‘\_’. This variable is optional.

All other variables have no standard-defined meaning.

## FILES

- */etc/os-release*

  Symbolic link to actual *os-release* file.

- */var/run/os-release*

  Generated os-release file describing the currently running system.

## SEE ALSO

- CPE Specification

  **https://csrc.nist.gov/projects/security-content-automation-protocol/scap-specifications/cpe**

- RFC 3986

  **https://tools.ietf.org/html/rfc3986**

- os-release Specification

  **https://www.linux.org/docs/man5/os-release.html**

## HISTORY

This file first appeared in FreeBSD 13.0.
