Linux: Determine the version of SLES Linux

If you need to find out your SLES (SuSE Linux Enterprise Server) version and service pack level from command line, you can use one of the following:

This one tells you the version, patch level and CPU architecture:

myserver:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)

This one will only tell you it is a SLES server and which version:

myserver:~ # cat /etc/SuSE-brand

This one displays a welcome message with the version, service pack and CPU architecture:

myserver:~ # cat /etc/issue

Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).

This one gives you basically all you need to know:

myserver:~ # cat /etc/products.d/
<?xml version="1.0" encoding="UTF-8"?>
<product id="sle-11-server" schemeversion="0">
  <vendor>SUSE LINUX Products GmbH, Nuernberg, Germany</vendor>
      <repository path="obs://" />
      <repository path="obs://" />
      <repository path="obs://" />
  <upgrades />
  <summary>SUSE Linux Enterprise Server 11 SP1</summary>
  <description>SUSE Linux Enterprise offers a comprehensive
        suite of products built on a single code base.
        The platform addresses business needs from
        the smallest thin-client devices to the world√Ęs
        most powerful high-performance computing
        and mainframe servers. SUSE Linux Enterprise
        offers common management tools and technology
        certifications across the platform, and
        each product is enterprise-class.</description>
    <url name="releasenotes"></url>
    <url name="smolt"></url>
    <url name="register"></url>
    <releasepackage name="sles-release" flag="EQ" version="11.1" release="1.152" />
  <runtimeconfig />

zypper will also show you the SLES version and service pack:

myserver:~ # zypper sl
# | Alias                                            | Name                                             | Enabled | Refresh | Type
1 | SUSE-Linux-Enterprise-Server-11-SP1 11.1.1-1.152 | SUSE-Linux-Enterprise-Server-11-SP1 11.1.1-1.152 | Yes     | No      | yast2

You can also use sam to get this piece of information. But it actually does much more. By using the following options you can reduce the time it needs to run (by disabling some checks):

myserver:~ # sam --no-rpm-verify --no-header-sig-check
Supportability Analysis Module 0.8.2
*** Report by 'sam --no-rpm-verify --no-header-sig-check'
*** Installed versions:
  suse-sam-data    0.8.2-0.3.1
  satsolver-tools  0.14.17-0.2.18
  suse-sam         0.8.2-0.3.3
  perl-satsolver   0.14.17-0.2.18
*** Installed products: 1 (known vendors: 1)
  System architecture: x86_64
    summary:       SUSE Linux Enterprise Server 11 SP1
    name version:  SUSE_SLES 11.1
    SP, release:   1 1.152
    arch:          x86_64
    repository:    obs://
    repository:    obs://
    repository:    obs://
*** Found package repositories: 1 (reference 12, skipped 12, need refresh 0)
  Repository #1:
    name:          SUSE-Linux-Enterprise-Server-11-SP1 11.1.1-1.152
    label:         SUSE Linux Enterprise Server 11 SP1 (3)
    distribution:  SUSE_SLE
    version:       11
*** Considered packages:
    Packages belonging to defined products:  817
    Signed with accepted key:                not checked
    3rd party packages:                      0
    Skipped gpg-key packages:                9
*** Unsatisfied package dependencies: NOT CHECKED
*** Novell packages depending on 3rd party packages: NONE
*** Package version checks: all up to date
*** Modified filesystem objects: NOT CHECKED
*** Files not owned by any package: NOT CHECKED

*** Summary (see above or log for details):

  Product: SUSE_SLES 11.1 SP:1 release:1.152 x86_64

    Total packages installed:                         826
    Packages signed by Novell:                        817
    Packages matching installed products:             817
    Packages not created by Novell:                   0
    Unsupported Novell packages:                      0
    File modifications:                               (not checked)
    Unsatisfied dependencies:                         (not checked)
    Novell packages depending on 3rd party packages:  0
    Updates needed:                                   0
    Files not belonging to a package:                 (not checked)

Status and recommendations:

    Congratulations, your system has passed the supportability analysis!
      According to the tests performed by SAM, nothing has been detected
      which might exclude your system from receiving support from Novell.
      You may confidently deploy this system with support from Novell.

Note: sam has replaced SPident in SLES 11.

You can get information about the kernel version using:

myserver:~ # rpm -qf /boot/vmlinuz


myserver:~ # cat /proc/version
Linux version (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200

or simply:

myserver:~ # uname -a
Linux myserver #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux

Leave a Reply

Your email address will not be published. Required fields are marked *