Advertisement
Tech

The Version Command in Linux Explored

Confused about version numbers in Linux? Want to find out how you can check the version numbers of all the installed applications? Then this guide is just for you! We take a look at how you can find out the version info for everything installed on your Linux computer.

By Pranav Thadeshwar
Desk Tech
Reading time 3 min read
Word count 524
Linux Computing Linux commands
The Version Command in Linux  Explored
Advertisement
Quick Take

Confused about version numbers in Linux? Want to find out how you can check the version numbers of all the installed applications? Then this guide is just for you! We take a look at how you can find out the version info for everything installed on your Linux computer.

On this page

Introduction

Every application you come across today has a version number or identification. Whether it’s something as your Operating System (Windows Vista, 7, XP, Ubuntu 10.04, 9.10), or something as basic as a multimedia player, new releases are signified by a change or increase in the version identification.

In Linux, finding and keeping up with the latest versions is usually a good practice. Firstly, because you might come across some application that will only run with a certain version of a library, or because a newer updated version of an application has come out that fixes bugs in your current version. Although your package manager will seamlessly upgrade to the latest versions, finding out the version of any application is an important skill.

Advertisement

Kernel and Distribution Versions

The Kernel is the core of the operating system, and in Linux, you will routinely come across kernel upgrades that promise more features or more stability. But how do you find out which kernel you’re currently running? Just open up a terminal window and type the following command:

uname -sr

Advertisement

As you can see, I am passing two parameters with the uname command. The -s switch prints the name of the Kernel, and -r prints the release version of the command. The output?

Linux 2.6.18-164.el5

Advertisement

Don’t worry if you get a different output. This output is taken from my dedicated server running Red Hat Enterprise Linux 5. If you are running a newer operating system, your kernel version will be higher than the output. On a newer machine, this is what I got:

Linux 2.6.33.5-xxxx-grs-ipv4-64

Advertisement

Finding the distribution version is as simply as typing:

cat /etc/*-release

Advertisement

On my newer machine, this is what I have installed:

Distribution

Advertisement

CentOS release 5.5 (Final)

Other applications

With most command-line applications, there is a common switch –version that will show you the version number. Want to test it out? Append the –version switch after any command. For example, I wanted to find the version of the bash shell that I’m running:

Advertisement

I typed “bash –version” and got the following:

bash

Advertisement

GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)Copyright (C) 2005 Free Software Foundation, Inc.

Similarly, if I wanted to find the version of hddtemp, I’d type “hddtemp –version”. Here is what I got:

Advertisement

hddtemp

hddtemp version 0.3-beta15

Advertisement

With graphical applications, the standard method of finding the version number is to go to the Help menu and click on About. However sometimes, software authors do not follow standard convention and this method becomes invalid. In those cases, reading the documentation is the next best alternative.

Getting Help from your Package Manager

With applications, finding the version number is easy enough. But what if you wanted to find out the version info of a library? In most cases, there is no command to run to find out the version. In such a scenario, you can use your package manager to find out which versions of the library you have installed.

Advertisement

The easiest way to accomplish this is by searching in the package manager for the library that you need the version info of. The package manager will list the package and the version that is installed on your system.

Keep Exploring

More from Tech

Filed under
Linux Computing
More topics
Linux commands
Advertisement