Identifying Operating Systems
- WHAT?
The article describes how you can identify SUSE products and changes coming with the last release of SUSE Linux Enterprise.
- WHY?
You want to review your system configuration and scripts to match the new values.
- EFFORT
It takes about 5 minutes to read the article.
- GOAL
You will know the new values and attributes that identify SUSE products.
- REQUIREMENTS
Installed product of the SUSE Linux Enterprise family.
1 Why identify an operating system? #
As software developers and system administrators, you often manage several versions of the same product or even several products. Operations on each version or product may require a different configuration, therefore, it is crucial to easily identify the system.
Proper system identification can help you with automation, ensuring compatibility, troubleshooting, and so on.
2 The /etc/os-release content #
For operating system identification, use a text-based file /etc/os-release. The file contains product key attributes like name and version. Viewing and
interpreting the content can help you with automation, ensuring compatibility, troubleshooting, and so on.
With SUSE Linux Enterprise 16.0 and SUSE Linux Micro 6.2 the content of the /etc/os-release is
changed to the values described in the following sections. However, the valus are
compatible with previous releases.
The /etc/os-release file contains two types of attributes: common
attributes and product-specific attributes. Each type is described further.
2.1 Common attributes #
The common attributes have the same values for all SUSE Linux Enterprise products.
| Attribute | Meaning | Value |
|---|---|---|
NAME | Full name of the distribution | SLES |
PRETTY_NAME | A prettified name that is displayed to the user | SUSE Linux Enterprise Server 16.0 |
VERSION | A complete version | 16.0 |
VERSION_ID | A version number. This is the recommended attribute for identifying the operating system. | 16.0 |
ID | Short identification of the distribution. This is the recommended attribute for identifying the operating system. | sles |
ID_LIKE | A list of similar distributions | suse opensuse |
CPE_NAME | Common Platform Enumeration | cpe:/o:suse:sles:16:16.0 |
2.2 Product-specific attributes #
The product-specific attributes differ for each SUSE product. The file
/etc/os-release contains the following product-specific attributes:
| Attribute | Meaning | Value for SUSE Linux Enterprise Server | Value for SLES for SAP | Value for SUSE Linux Micro |
|---|---|---|---|---|
VARIANT | The specific flavor of the product. This is a newly introduced attribute. | Enterprise Server | Enterprise Server for SAP applications | Micro |
VARIANT_ID | A short machine readable name that can be used to identify a particular product in scripts. This is a newly introduced attribute. | server | server-sap | transactional |
SUSE_SUPPORT_PRODUCT | The official SUSE product name. This is a newly introduced attribute. | SUSE Linux Enterprise Server | SUSE Linux Enterprise Server for SAP applications | SUSE Linux Micro |
SUSE_SUPPORT_PRODUCT_VERSION | The official SUSE product version. This is a newly introduced attribute. | 16.0 | 16.0 | 6.2 |
3 Legal Notice #
Copyright© 2006–2025 SUSE LLC and contributors. All rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”.
For SUSE trademarks, see https://www.suse.com/company/legal/. All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.
All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.