How to find version of a software installed in ubuntu How to find version of a software installed in ubuntu shell shell

How to find version of a software installed in ubuntu


You can use dpkg to get that info:

dpkg -l mysql-server | grep -E "^ii" | tr -s ' ' | cut -d' ' -f3

This will give you the installed version of the mysql-server package.

If a package is not installed, it will print out "No packages found matching mysql-server." instead.


Almost all programs that can be run in the command line have a --version option.

For example:

git --versionls --version

The format of their output is nowhere near standard though. Some make it easier to parse, some (often) include a little information about the license.