How to display the Linux version
This article describes how to display the latest version of your Linux distribution as well as in the console and on a Graphical User Interface (GUI).
These steps are applicable on all distributions with Linux-Kernel as Debian or Fedora.
Console
There are three ways to display the version on the command line:
- The information is taken from the release file
- The tool
lsb_releasecan be used - The code
hostnamectlcan be used
All these ways are presented in the following.
Release file
The file is located in the folder /etc/ and can be called up with the command cat. This file has a different name depending on the distribution.
This way is recommended if the name of the release file is known. There are a few examples in the following:
Fedora
user@fedora:~$ cat /etc/fedora-release
Debian
user@debian:~$ cat /etc/debian_version
Ubuntu
user@ubuntu:~$ cat /etc/lsb-release
lsb_release

The Linux Standard Base (LSB) version reporting service programm functions the same with every distribution.
Installation
If the programm is not available on your system, you can install it with the help of your package manager.
Debian-Kernel
user@linux:~$ sudo apt install lsb_release
Fedora-Kernel
user@linux:~$ sudo yum install lsb_release
Usage
The application of the programm fuctions the same with all distributions:
user@linux:~$ lsb_release -d
An exemplary issue could look like this:
description: Fedora Linux 40 (Workstation Edition)
hostnamectl
The programm hostnamectl controls the name of the computer name and displays system information. To display the Linux version, use the following command:
user@linux:~$ hostnamectl
An issue could look, for example, like this:
Static hostname: issos
Icon name: computer-vm
Chassis: vm
Machine ID: 5455b099eaa24bb19941a4d5f645ff0c
Boot ID: dbf5bf495429416ea15d1fe161b6c634
Virtualization: kvm
Operating System: Debian GNU/Linux 12 (bookworm)
Kernel: Linux 6.1.0-22-amd64
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC _i440FX + PIIX, 1996_
Firmware Version: rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org
GUI

If you want to find out the version on your desktop, you need the package hardinfo.
This can be installed via console with the following command:
Fedora
user@linux:~$ sudo yum install hardinfo2
Debian/Ubuntu
user@linux:~$ sudo apt install hardinfo
|
Author: Stefan Bohn Stefan Bohn has been employed at Thomas-Krenn.AG since 2020. Originally based in PreSales as a consultant for IT solutions, he moved to Product Management in 2022. There he dedicates himself to knowledge transfer and also drives the Thomas-Krenn Wiki. |
|
Translator: Alina Ranzinger Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.
|


