How To Find OpenSuse / SUSE Linux Version

last updated in Categories , ,

How do I find out my Suse Linux / OpenSuse Linux / Suse Enterprise Linux server/desktop version using the command line options?

You need to use the following cat command to find out your SUSE / OpenSuse Linux version. Open a terminal application and type the following command:

Finding OpenSUSE / SUSE version

$ cat /etc/SuSE-release
Sample Outputs:

SUSE Linux Enterprise Server 12 (x86_64)
VERSION = 12
PATCHLEVEL = 3
# This file is deprecated and will be removed in a future service pack or release.
# Please check /etc/os-release for details about this release.

Using /etc/os-release file to find OpenSUSE / SUSE Linux version

Another options is to type the following command:
$ cat /etc/os-release
Sample outputs:

NAME="openSUSE Leap"
VERSION="42.3"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.3"
PRETTY_NAME="openSUSE Leap 42.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

Use lsb_release command

You may need to install a package callee lsb_release using the zypper command:
$ sudo zypper install lsb-release
Sample outputs:

Loading repository data...
Reading installed packages...
Resolving package dependencies...
 
The following NEW package is going to be installed:
  lsb-release
 
1 new package to install.
Overall download size: 9.2 KiB. Already cached: 0 B. After the operation, additional 16.2 KiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package lsb-release-2.0-28.3.noarch                                                                                                                                                           (1/1),   9.2 KiB ( 16.2 KiB unpacked)
Retrieving: lsb-release-2.0-28.3.noarch.rpm ................................................................................................................................................................................[done (1.2 KiB/s)]
Checking for file conflicts: ...........................................................................................................................................................................................................[done]
(1/1) Installing: lsb-release-2.0-28.3.noarch ..........................................................................................................................................................................................[done]

Once installed type the following command:
$ lsb_release -a
Sample outputs:

LSB Version:	n/a
Distributor ID:	openSUSE project
Description:	openSUSE Leap 42.3
Release:	42.3
Codename:	n/a

hostnamectl command to get SUSE Operating System version

One can use hostnamectl command to query and change the system hostname and related settings. It can also display your operating system version. Type the following hostnamectl command:
$ hostnamectl

Find OpenSUSE / SUSE Linux version
Finding OpenSUSE / SUSE Linux version

Is my SUSE Linux 32 vs 64 Bit?

Run:
getconf LONG_BIT
For more info see my previous FAQ: “How do I know if my Linux is 32 bit or 64 bit?

Conclusion

This page showed how to find out SUSE Enterprise Linux (SLE) and OpenSUSE Linux using various command line options. I suggest that you read the following man pages for more information:
man cat
man lsb_release
man hostnamectl

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Start the discussion at www.nixcraft.com

Historical Comment Archive

3 comment

  1. Hello,
    I installed open suse 12.2 and got problems to get to internet. I can see that I am connected to my local WiFi, and the wired one. when I ping 8.8.8.8, it works but the ping to DNS not working exemple google.com. please feed me if any help can be found
    Nasreldin

    Still, have a question? Get help on our forum!