xref: /freebsd/share/man/man5/os-release.5 (revision e1e636193db45630c7881246d25902e57c43d24e)
1.\"
2.\" Copyright (c) 2019 M. Warner Losh <imp@FreeBSD.org>
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd November 23, 2021
26.Dt OS-RELEASE 5
27.Os
28.Sh NAME
29.Nm os-release
30.Nd file describing the current OS and some of its attributes
31.Sh DESCRIPTION
32The
33.Nm
34file is a new-line separated list of key value pairs.
35The syntax of this file is a reduced
36.Xr sh 1
37variable assignment with the
38following restrictions:
39.Bl -bullet
40.It
41Strings cannot be concatenated together
42.It
43No variable expansion is done
44.It
45All shell special characters must be quoted as documented in
46.Xr sh 1
47.It
48Variable assignments must be included inside of double quotes
49if they contain characters outside of A-Z, a-z and 0-9
50.It
51All strings should be UTF-8 format
52.It
53Non-printable characters should not be used in the strings
54.El
55.Pp
56Lines starting with the character
57.Ql #
58are ignored as comments.
59.Sh VARIABLES
60The following variables are defined by the standard.
61.Bl -tag -width XXXXXXXXXX -compact
62.It Dv NAME
63A string describing the preferred OS name.
64.It Dv VERSION
65Version string for the OS, in its usual and customary format.
66.It Dv ID
67Lower case version of the name with only a-z, 0-9,
68.Ql \&. ,
69.Ql - ,
70and
71.Ql _ .
72.It Dv VERSION_ID
73Lower case version of the version with only a-z, 0-9,
74.Ql \&. ,
75.Ql - ,
76and
77.Ql _ .
78.It Dv PRETTY_NAME
79A pretty version of the name presented to the user.
80May contain release information.
81.It Dv ANSI_COLOR
82Suggested color presentation for the OS.
83This string should be suitable for inclusion within an ESC [ m ANSI/ECMA-48
84escape sequence to render the OS in its preferred color.
85This variable is optional.
86.It Dv CPE_NAME
87A CPE name for the operating system.
88This field shall follow the NIST Common Platform Enumeration specification.
89.It Dv HOME_URL
90.It Dv SUPPORT_URL
91.It Dv BUG_REPORT_URL
92.It Dv PRIVACY_POLICY_URL
93Links on the internet, in RFC 3986 format for different aspects of this OS.
94These variables are optional.
95.It Dv BUILD_ID
96A string identifying the build.
97This variable is optional.
98.It Dv VARIANT
99A string describing the variant of this operating system.
100This variable is optional.
101.It Dv VARIANT_ID
102Lower case version of the variant with only a-z, 0-9,
103.Ql \&. ,
104.Ql - ,
105and
106.Ql _ .
107This variable is optional.
108.El
109.Pp
110All other variables have no standard-defined meaning.
111.Sh FILES
112.Bl -tag -width XXXXXXXXXX -compact
113.It Pa /etc/os-release
114Symbolic link to actual
115.Pa os-release
116file.
117.It Pa /var/run/os-release
118Generated os-release file describing the currently running system.
119.El
120.Sh SEE ALSO
121.Bl -tag -width XXXXXXXXXX -compact
122.It CPE Specification
123.Lk https://csrc.nist.gov/projects/security-content-automation-protocol/scap-specifications/cpe
124.It RFC 3986
125.Lk https://tools.ietf.org/html/rfc3986
126.It os-release Specification
127.Lk https://www.linux.org/docs/man5/os-release.html
128.El
129.Sh HISTORY
130This file first appeared in
131.Fx 13.0 .
132