How do I check the version of a program in Linux?

Posted on 2004-10-14
Last Modified: 2013-11-13
How do I check the version of a program in Linux? In command line interface.
Question by:DBDevOne

Accepted Solution

net_sec_guru earned 250 total points
ID: 12310493
I usually use two different methods:

<command to execute command> -v
ie - # nmap -v

or else I will query the rpm database for version:
rpm -qa |grep <program> (qa will show all programs installed so you need to grep for the one you want)
ie # rpm -q libc

Hope this helps!

And you can always "man" the program and check out how to check version number in there.

Expert Comment

ID: 12310711
If -v does not work, try -V or --version

Author Comment

ID: 12311449
Thank you!!

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question