Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Check Your Linux Version

Find the distribution name, version and kernel of any Linux system.

VPS and Cloud Servers1 min read4 screenshots

Why check

  • Make sure software and hardware are compatible.
  • Fix problems that belong to one distribution.
  • Know when you need security updates.
  • Tune the system for your kernel.

Open a terminal, or connect to your server with SSH.

Method 1: uname

uname -a
Output of uname -a

How to read the output:

  • Linux is the operating system.
  • The next number, such as 6.5.0-28-generic, is the kernel version.
  • The long text after it holds the build details of the kernel.
  • x86_64 is the architecture. It means a 64-bit system.

Method 2: os-release file

cat /etc/os-release
Output of cat /etc/os-release

Useful lines:

  • PRETTY_NAME is the friendly name, for example "Ubuntu 22.04.4 LTS".
  • NAME is the distribution name.
  • VERSION_ID is the version number.
  • VERSION has more version details.

Method 3: lsb_release

lsb_release -a
Output of lsb_release -a

It prints the distributor ID, description, release and code name. On some systems you must install the lsb-release package first.

Method 4: hostnamectl

hostnamectl
Output of hostnamectl

You see the operating system, the kernel and the architecture in one view.

Quick recap

  • cat /etc/os-release works almost everywhere.
  • uname -a gives the kernel.
  • hostnamectl shows both in one view.