- How To Find OpenSuse / SUSE Linux Version Using CLI
- How to find openSUSE Linux version
- Finding OpenSUSE/SUSE Linux version
- Using /etc/os-release file to find OpenSUSE / SUSE Linux version
- Use lsb_release command to find OpenSUSE version
- Show the release number
- Find the distributor’s ID
- View a description of Linux distro
- Display the code name of the OpenSUSE
- hostnamectl command to get SUSE Operating System version
- Is my SUSE Linux 32 vs 64 Bit?
- Video tutorial
- Conclusion
- How to Find openSUSE Linux Version
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- Linux Command: Show Linux Version
- How to check linux kernel version number?
- /proc/version file
- Find Distribution Version
- Related media
- How to check os version in Linux command line
- Check os version in Linux
- The /etc/os-release file
- Checking OS version on Linux using the lsb_release command
- hostnamectl command
- uname command
- /etc/issue file
- Getting help
- Related media
- Conclusion
- SDB:Find openSUSE version
- Contents
- Understanding the os-release fields
- The GUI way
- The CLI way
- In Shell Scripts
How To Find OpenSuse / SUSE Linux Version Using CLI
H ow do I find out my Suse Linux / OpenSuse Linux / Suse Enterprise Linux server/desktop version using the command line options? What is the command to find out OpenSUSE Linux version?
This page explains how to find SUSE or OpenSUSE Linux version using the cat command and other commands.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | No |
Requirements | OpenSUSE/SUSE Linux |
Est. reading time | 3 minutes |
How to find openSUSE Linux version
- Open the terminal application.
- For remote SUSE server use the ssh command.
- Now type cat /etc/os-release to display OpenSUSE/SUSE Linux version.
- You can also use the lsb_release -a to figure out which version of the openSUSE Linux is installed.
- Another option to list OpenSUSE/SUSE version is to type the hostnamectl command.
Finding OpenSUSE/SUSE Linux version
Open a terminal application (or log in using the ssh command and then type the following command:
$ cat /etc/SuSE-release
$ cat /etc/os-release
Sample Outputs:
Let us see other commands that explains how to check the OpenSUSE/SUSE OS version to install software or configure the server correctly.
Using /etc/os-release file to find OpenSUSE / SUSE Linux version
Another options is to type the following less command or more command:
$ more /etc/os-release
Here is what I see:
Here is another outputs from OpenSUSE Linux server:
Use lsb_release command to find OpenSUSE version
We can show Linux distribution-specific information using the lsb_release command. LSB means Linux Standard Base. Firs install a package called lsb_release using the zypper command:
$ sudo zypper install lsb-release
Sample outputs:
Once installed type the following command:
$ lsb_release -a
Sample outputs:
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
The -a option show all of the above information but we have additional options.
Show the release number
Find the distributor’s ID
View a description of Linux distro
Display the code name of the OpenSUSE
lsb_release -c
Getting help message on screen is easy. All you have to do is type the following command:
lsb_release -h
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
Finding OpenSUSE / SUSE Linux version
Is my SUSE Linux 32 vs 64 Bit?
We can query Linux system configuration variables using the getconf command. Run the following command:
getconf LONG_BIT
Sample outputs:
For more info see my previous FAQ: “How do I know if my Linux is 32 bit or 64 bit?“. Finding a version helps us to install correct software and other utilities. In some cases, sysadmin and developers can patch their machine against known vulnerabilities. The goal is to keep your server safe and secure against bad guys. Hence, finding the OpenSUSE/SUSE version is an essential task for the OPs team.
Video tutorial
Conclusion
This page showed how to find out SUSE Enterprise Linux (SLE) and OpenSUSE Linux version using various command line options. I suggest that you read the following man pages using the man command for more information or read it online here:
man cat
man lsb_release
man hostnamectl
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
How to Find openSUSE Linux Version
In this article, we will explain how to find out which version of openSUSE Linux distribution installed and running on a computer. The /etc/os-release and /usr/lib/os-release files include all openSUSE version information and you can view openSUSE Version information in these two files using your favorite text editor from the graphical user interface (GUI) or from the command line interface (CLI) as shown below.
From the GUI, simply open the /etc/os-release and /usr/lib/os-release files using your favorite text editor. For example using Kate text editor, which contain operating system identification data.
Find openSUSE Version in GUI
Alternatively, open the terminal and use the cat utility to view contents of /etc/os-release and /usr/lib/os-release as shown.
Find openSUSE Version
Some of the important fields in the file are explained below:
- NAME: A human-friendly name of the distribution, without the version number. example “openSUSE Leap“.
- PRETTY_NAME: A human-friendly name of the distribution, with a version number. example “openSUSE Leap 15.0“.
- VERSION: A human-friendly version of the distribution. example “15.0“.
- ID: A computer-friendly name of the distribution, without the version number. example “opensuse-leap“. This field should be safe for parsing in scripts.
- ID_LIKE: A space divided list of IDs for equivalent operating systems with common behavior to ID=. example “opensuse suse“. Note that the entry of “suse” means all openSUSE, SUSE, SUSE Linux Enterprise distributions and derivatives such as “opensuse” represents only openSUSE distributions and derivatives.
- VERSION_ID: A computer-friendly version of the distribution. example “15.0” or “20180530“.
Another Alternative way is to use the lsb_release command to find the version of your currently running OpenSuSE Linux as shown.
Note: Your system must have lsb-release package installed, if not, install it using zypper command as shown.
That’s all! In this short article, we have described instructions on how to find which version of openSUSE you are running via the Graphical and Command-line way. If you have any questions or thoughts to share concerning this topic, reach us via the comment form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
Linux Command: Show Linux Version
[a] uname – Print kernel and system information.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | No |
Requirements | None |
Est. reading time | 1m |
[b] lsb_release – Print distribution-specific information. [c] /proc/version file – Print running kernel information.
How to check linux kernel version number?
Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:
$ uname -r
Sample outputs:
Or type the following command:
$ uname -mrs
Sample outputs:
To print all information, enter:
$ uname -a
Sample outputs:
- 2.6.32-23 – Linux kernel version number
- pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
- SMP – Kernel that supports multi core and multiple cpus.
/proc/version file
Type the following command to see Linux version info:
$ cat /proc/version
Sample outputs:
The above output identifies the kernel version that is currently running. It includes the contents of /proc/sys/kernel/ostype , /proc/sys/kernel/osrelease , and /proc/sys/kernel/version files. For example:
$ cat /proc/sys/kernel/
Sample outputs:
Find Distribution Version
Type the following command:
$ cat /etc/*release
OR
$ lsb_release -a
Sample outputs:
Here is another output from my Debian based server:
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
Related media
This tutorial is also available in a quick video format:
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
How to check os version in Linux command line
Check os version in Linux
The procedure to find os name and version on Linux:
- Open the terminal application (bash shell)
- For remote server login using the ssh: ssh user@server-name
- Type any one of the following command to find os name and version in Linux:
cat /etc/os-release
lsb_release -a
hostnamectl - Type the following command to find Linux kernel version:
uname -r
Let us see all examples in details for common Linux distros.
The /etc/os-release file
Type the following cat command:
$ cat /etc/os-release
Sample outputs:
We can filter out information such as OS version and name using the grep command/egrep command as follows:
$ grep ‘^VERSION’ /etc/os-release
$ egrep ‘^(VERSION|NAME)=’ /etc/os-release
Here is what we see:
Even tiny Linux distro such as Alpine Linux provide the required OS (Operating system) information, including version:
Checking OS version on Linux using the lsb_release command
The lsb_release command gives LSB (Linux Standard Base) and distribution-specific information on the CLI. The syntax is:
$ lsb_release -a
Sample outputs:
hostnamectl command
Use hostnamectl command to query and change the system hostname and related settings. Just type the following command to check OS name and Linux kernel version:
$ hostnamectl
And it will give info as follows. Look out for “ Operating System ” and “ Kernel “:
Another outputs from my OpenSUSE Linux 15.2 server:
uname command
/etc/issue file
Use more command/less command as follows:
$ cat /etc/issue
$ more /etc/issue
$ less /etc/issue
Getting help
You can also view the manual page on uname using the following command:
$ man hostnamectl
$ man uname
$ man cat
Related media
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
Conclusion
We explained how to find and display the OS version on Linux. The safest option is to query /etc/os-release file using grep or cat command. Systemd based Linux distro users can use the hostnamectl command.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
SDB:Find openSUSE version
Contents
Understanding the os-release fields
The os-release file is the file which contains all openSUSE version details. Please refer to the upstream documentation for details.
Important fields include
- NAME= The human-friendly name of the distribution, without version number. eg «openSUSE Leap» or «openSUSE Tumbleweed». Automatically parsing this field should be avoided.
- PRETTY_NAME= The human-friendly name of the distribution, including version number when relevant. eg «openSUSE Leap 15.0» or «openSUSE Tumbleweed». Automatically parsing this field should be avoided.
- VERSION= The human-friendly version of the distribution. Only used in Leap eg. «15.0». Automatically parsing this field should be avoided.
- ID= The computer-friendly name of the distribution, without version number. eg «opensuse-leap» or «opensuse-tumbleweed». This field should be safe for parsing in scripts.
- ID_LIKE= A space separated list of IDs for related operating systems with common behaviour to eg «opensuse suse». This is so scripts don’t need to micro-manage every possible option of The entry of «suse» represents all openSUSE, SUSE, SUSE Linux Enterprise distributions and derivatives. «opensuse» repesents only openSUSE distributions and derivatives. This field should be safe for parsing in scripts.
- VERSION_ID= The computer-friendly version of the distribution. eg. «15.0» or «20180530». This field should be safe for parsing in scripts.
/usr/lib/os-release should be used unless /etc/os-release exists, which should be given precedence.
On openSUSE distributions /etc/os-release is normally a symlink to /usr/lib/os-release by default
The GUI way
Open /usr/lib/os-release or /etc/os-release in your favorite text editor.
The CLI way
Open a terminal, run
This should show something similar to:
More examples what this file looks like on the various openSUSE and SUSE Linux distributions can be found on SDB:SUSE_and_openSUSE_Products_Version_Outputs.
In Shell Scripts
It’s easiest to simply source the file and check the variables it sets, for example
However this is not suitable for scripts which need to do things for the broader openSUSE family of distros (ie. Leap, Tumbleweed and variants like Kubic), nor the entire *SUSE family of distros (ie. Leap, Tumbleweed, variants, AND SLE)
For this you need to start using the ID_LIKE field, depending on the scope you are interested in.
Источник