How To Find OpenSuse / SUSE Linux Version Using CLI

‮w//:sptth‬ww.lautturi.com
How To Find OpenSuse / SUSE Linux Version Using CLI

To find the version of OpenSUSE or SUSE Linux using the command line, you can try one of the following methods:

  1. cat /etc/os-release: This file is a standard file found in most Linux distributions, and it contains information about the distribution, including its name and version. To display the contents of this file on OpenSUSE or SUSE Linux, you can use the cat command:
$ cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.2"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="15.2"
PRETTY_NAME="openSUSE Leap 15.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
  1. zypper info: This command is part of the zypper package manager, which is used to manage software packages on OpenSUSE and SUSE Linux. To display the version of the operating system, you can use the info subcommand with the -t flag:
$ zypper info -t
Product Information:
  Name: openSUSE Leap
  Version: 15.2
  Arch: x86_64
  Vendor: openSUSE
  Product Class: base
  Installed: Yes
  Status: up-to-date
  Summary: The openSUSE Leap operating system
  1. lsb_release: This command is part of the Linux Standard Base (LSB) utility, and it can be used to display information about the Linux distribution. To display the name and version of OpenSUSE or SUSE Linux, you can use the -a flag:
$ lsb_release -a
Distributor ID: openSUSE
Description:    openSUSE Leap 15.2
Release:        15.2
Codename:       Leap

Note that these methods may not work on all versions of OpenSUSE or SUSE Linux, as the information about the distribution may be stored in different locations or in different formats. However, these methods should work on most versions of these distributions.

Created Time:2017-10-28 21:38:52  Author:lautturi