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.
Before you start
Connect with SSH or open the VNC console. None of these commands change anything, so they are safe to run.How to check the Linux distribution and version
NAME and VERSION_ID show the distribution and release, for example VERSION_ID="9.6".
Other ways per distribution
- Ubuntu / Debian
- AlmaLinux / Rocky
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.lsb_release may not be installed on minimal systems; /etc/os-release always is.
How to check the kernel version
How to see a summary with hostnamectl
Virtualization: kvm shows a virtual server. On a dedicated server this line is missing.
How to check CPU, memory and disk
Example:
How to get everything in one report
neofetch prints a summary with the distribution logo. It is an optional extra:
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. Iflsb_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.Is my server 32-bit or 64-bit?
Rununame -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.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
VPS and dedicated server guides
Every server guide in one place.
Which Linux distribution is best?
Compare server distributions.
Upgrade Ubuntu to a new release
Move to a newer LTS.
Monitor resources with htop
Live CPU and memory use.
Change the hostname
Set the name hostnamectl shows.
Checked against the official os-release specification and the hostnamectl manual 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.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
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026