How to find out what version of an app is installed on Linux

Quick, what version of openssh-server is installed on your Ubuntu or CentOS server? Don’t know? Find out how in this video.

How to find out what version of an app is installed on Linux
Quick, what version of openssh-server is installed on your Ubuntu or CentOS server? Don’t know? Find out how in this video.

How many times have you needed to know which version of a piece of software is installed on Linux? If it’s a GUI tool, most often you can simply go to the Help | About menu and find out what version you’re using. But what if the application in question has no GUI? Say, for instance, you need to know what version of the openssh-server you have installed. What do you do? 

Fortunately, there are some pretty easy ways to find out this information and I’m going to show you just how to do that. The only thing you’ll need to make this work is a Linux distribution, such as Ubuntu or CentOS. 

SEE: 10 free alternatives to Microsoft Word and Excel (TechRepublic download)

Let’s first see how this is done on Ubuntu Server. Log in to your Ubuntu-based system and find out which version of the OpenSSH server is installed with the command:

apt-cache policy openssh-server

That command will display the version that is installed as well as the version that is installable, indicated by the number 500. As you can see, my version is up to date. 

To do this same trick on CentOS, we’ll use the command:

yum info openssh-server

This command will give you a bit more information about both the installed and available versions. As you can see, my version is out of date, so I need to upgrade openssh-server on CentOS. 

And that’s all there is to finding out what version of a particular piece of software is installed on either Ubuntu or CentOS. Make sure you have this trick in your toolkit so you can always be aware of release numbers. It’ll come in handy when you find out a particular version of an application has a vulnerability to be patched.

Also see

linuxadminhero.jpg

Image: Jack Wallen