I have a server, and it has linux installed on it but i have no idea which version... how do i find out ...

Thanx

Dani AI

Generated

asked how to tell which Linux version is installed and gave the quick shell checks — a good start. For clarity: there are two different "versions" to look for. The kernel is the running Linux core; the distribution release is the vendor/userland (Ubuntu, CentOS, etc.). The notes below add a few reliable, distro-agnostic ways to confirm both and some troubleshooting tips.

Use the LSB metadata, systemd release file, or the system control utility to get the distro name and release:

lsb_release -a
cat /etc/os-release
hostnamectl

lsb_release (when present) prints distributor ID, description, release and codename. /etc/os-release contains NAME and VERSION fields on modern systems. hostnamectl (systemd hosts) reports Operating System and Kernel lines together.

To inspect what kernel is actually running and what kernel packages are installed:

cat /proc/version
ls /boot
dpkg -l 'linux-image*'    # Debian/Ubuntu
rpm -q kernel             # RHEL/CentOS/Fedora
pacman -Q linux           # Arch

/proc/version shows the kernel build string and compiler. /boot often contains kernel images (vmlinuz-*) and initramfs filenames. Package-manager queries list installed kernel packages and their versions.

Caveats and troubleshooting: containers show the host kernel, so the running kernel may not match container images. The running kernel can differ from installed packages (reboot required to switch versions). Some files or commands require root/sudo to read package databases or protected files. If release files are missing, inspect the bootloader config (GRUB) and /boot entries. These checks complement 's quick commands and help determine both what is currently running and what kernels or distro packages are present on disk.

Recommended Answers

All 2 Replies

Use

uname -r

That will print the kernel version number.
To print the name of the distro running on your machine, use

cat /etc/release

or

cat /etc/issue

(that depends on the distribution)

Thank you... :cool:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.