I would like to know how to get the version information of an installed program that doesn't have the
--version
or-version
method implemented.
I would like to know how to get the version information of an installed program that doesn't have the
--version
or-version
method implemented.
You can use
dpkg
orapt-cache
.To check the version of
bash
, for example:If the program doesn't have any command line option that displays version information you can try to use
dpkg
to get the package version which usually contains the program version ion some way.prints the package that contains YOUR_PROGRAM, and
prints the version of YOUR_PACKAGE.
You can put it all together:
Use it for example like this for
ls
:The below command also gives you the exact installed package version.
Example
You can use
dpkg-query
to get the version of a package:To only get the version string: