> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Check Your Linux Version (and Other System Info)

> Check your Linux version with cat /etc/os-release, which shows the distribution and release on any distro. Use uname -r for the kernel and lscpu for hardware.

To check your Linux version, run `cat /etc/os-release`. It shows the distribution name and release on every modern distribution, for example `PRETTY_NAME="Ubuntu 24.04.5 LTS"`. Run `uname -r` for the kernel version and `hostnamectl` for a summary that includes both. For hardware, use `nproc` or `lscpu` for the CPU, `free -h` for memory and `df -h` for disk space.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Beginner | 2 minutes | Every Linux distribution | An SSH session (no sudo needed) |

## Before you start

[Connect with SSH](https://help.freakhosting.com/portals/other/how-to-connect-to-a-linux-server-with-ssh.md) or open the [VNC console](https://help.freakhosting.com/portals/vps-panel/how-to-enable-and-use-vnc-console-access.md). None of these commands change anything, so they are safe to run.

## How to check the Linux distribution and version

```bash theme={null}
cat /etc/os-release
```

Example output on Ubuntu:

```text theme={null}
PRETTY_NAME="Ubuntu 24.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.5 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
```

On AlmaLinux or Rocky Linux, `NAME` and `VERSION_ID` show the distribution and release, for example `VERSION_ID="9.6"`.

### Other ways per distribution

> [tab] Ubuntu / Debian
>
> ```bash theme={null}
> lsb_release -a
> cat /etc/debian_version
> ```
>
> `lsb_release -a` prints the description, release number and codename. On Debian, `/etc/debian_version` holds the exact point release, such as `13.7`; on Ubuntu it shows the Debian base it was built from (for example `trixie/sid`), not the Ubuntu version.

> [tab] AlmaLinux / Rocky
>
> ```bash theme={null}
> cat /etc/redhat-release
> rpm -E %rhel
> ```
>
> `/etc/redhat-release` prints the full name and version on one line. `rpm -E %rhel` prints just the major version, such as `9`.

`lsb_release` may not be installed on minimal systems; `/etc/os-release` always is.

## How to check the kernel version

```bash theme={null}
uname -r
```

```text theme={null}
6.8.0-87-generic
```

| Command | Shows |
| - | - |
| `uname -r` | Kernel release |
| `uname -m` | Architecture: `x86_64` (64-bit Intel/AMD) or `aarch64` (ARM) |
| `uname -a` | Everything in one line |

## How to see a summary with hostnamectl

```bash theme={null}
hostnamectl
```

```text theme={null}
 Static hostname: server1.example.com
       Icon name: computer-vm
         Chassis: vm
  Virtualization: kvm
Operating System: Ubuntu 24.04.5 LTS
          Kernel: Linux 6.8.0-87-generic
    Architecture: x86-64
```

`Virtualization: kvm` shows a virtual server. On a dedicated server this line is missing.

## How to check CPU, memory and disk

| What | Command | What to look at |
| - | - | - |
| CPU cores | `nproc` | A single number, e.g. `4` |
| CPU model and details | `lscpu` | `Model name`, `CPU(s)` |
| Memory | `free -h` | `total` and `available` |
| Disks and partitions | `lsblk` | Size of each disk and where it is mounted |
| Disk space | `df -h` | `Size`, `Avail`, `Use%` |
| Uptime and load | `uptime` | Time since boot and load average |
| Network addresses | `ip -br addr` | Your IPv4 and IPv6 addresses |

Example:

```bash theme={null}
lscpu | grep -E "Model name|^CPU\(s\)"
free -h
```

```text theme={null}
CPU(s):                                  2
Model name:                              Intel(R) Xeon(R) Processor @ 2.10GHz
               total        used        free      shared  buff/cache   available
Mem:           7.8Gi       978Mi       5.4Gi        15Mi       1.8Gi       6.9Gi
```

## How to get everything in one report

`neofetch` prints a summary with the distribution logo. It is an optional extra:

```bash theme={null}
# Ubuntu 24.04
sudo apt install neofetch
neofetch
```

On dedicated servers, `sudo dmidecode -t system` and `sudo dmidecode -t memory` show the hardware maker, model and memory modules.

## How to check it worked

Each command prints information straight away. If `lsb_release` or `hostnamectl` says `command not found`, use `cat /etc/os-release` and `uname -r`, which work everywhere.

## Frequently asked questions

### How do I know if my Linux version is still supported?

Compare the version with the vendor's release cycle. Ubuntu 18.04 and 20.04, Debian 10 and 11 and CentOS 7 and Stream 8 are end-of-life and no longer get regular security updates; move to a supported release such as Ubuntu 24.04, Debian 13 or AlmaLinux/Rocky 9 or 10. See [which Linux distribution is best for a server](https://help.freakhosting.com/portals/other/which-linux-distribution-is-best-for-a-server.md).

### Is my server 32-bit or 64-bit?

Run `uname -m`. `x86_64` and `aarch64` are 64-bit. `i686` or `i386` is 32-bit, which current Ubuntu and Debian releases no longer support as a normal install.

### Why does the kernel version not change after updating?

The new kernel is installed but only loads after a reboot. Check whether a reboot is pending: see [update Linux packages](https://help.freakhosting.com/portals/other/how-to-update-linux-packages.md).

### How do I check the version of one program?

Most programs accept `--version` or `-v`: `nginx -v`, `php -v`, `mysql --version`, `python3 --version`. To see the package version, use `apt-cache policy nginx` (Ubuntu/Debian) or `rpm -q nginx` (AlmaLinux/Rocky).

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every server guide in one place.

> [card] [Which Linux distribution is best?](https://help.freakhosting.com/portals/other/which-linux-distribution-is-best-for-a-server.md)
>
> Compare server distributions.

> [card] [Upgrade Ubuntu to a new release](https://help.freakhosting.com/portals/other/how-to-upgrade-ubuntu-to-a-new-release.md)
>
> Move to a newer LTS.

> [card] [Monitor resources with htop](https://help.freakhosting.com/portals/other/how-to-monitor-server-resources-with-htop.md)
>
> Live CPU and memory use.

> [card] [Change the hostname](https://help.freakhosting.com/portals/other/how-to-change-the-hostname-on-linux.md)
>
> Set the name hostnamectl shows.

***

> [!NOTE]
>
> **Checked against the official [os-release specification](https://www.freedesktop.org/software/systemd/man/latest/os-release.html) and the [hostnamectl manual](https://www.freedesktop.org/software/systemd/man/latest/hostnamectl.html)** on 4 November 2026; `os-release`, `lsb_release`, `uname`, `lscpu`, `free` and `lsblk` tested on Ubuntu 24.04 LTS. Output differs between distributions and releases.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.