In Windows there is a version information page in an executable/library file properties window. How to view that info in Ubuntu?

  • 2
    Do you mean how to view such information from Linux binaries/libraries or windows EXE/DLL using a Linux utility ? Jan 26, 2011 at 23:30
  • 1
    As I've clearly specified in the question title, I mean PE (Windows) EXE and DLL files (to view using a Linux utility of course).
    – Ivan
    Jan 27, 2011 at 6:27

7 Answers 7


I'm working in a tool called pev to retrieve information about PE files on the command line.

It is installable with

sudo apt-get install pev

The file version can be fetched with

peres -v program.exe | awk '{print $3}'
  • 3
    @Ivan you might consider accepting this answer instead. Oct 25, 2013 at 16:39
  • These instructions are outdated. You might wish to consider updating them.
    – user435587
    Oct 28, 2018 at 5:49
  • 1
    The pev package in current debian distros doesn't contain a binary
    – rakslice
    Dec 17, 2019 at 7:07
  • 1
    In Ubuntu the command should be peres -v program.exe | awk '{print $3}' after sudo apt install pev
    – Huan
    Mar 2, 2020 at 15:20
  • pev -p works fine in Ubuntu 16.04. Just used to check Windows version remotely: pev -p /mnt/windows_host/Windows/explorer.exe
    – mivk
    Nov 1, 2020 at 18:40

From the gnome-exe-thumbnailer script, suggested by Scott Ritchie:

wrestool --extract --raw --type=version inputfile.exe

extracts the version information, printing some binary data mixed with UTF-16 text. The script converts it to readable text by piping it through:

tr '\0, ' '\t.\0' \
| sed 's/\t\t/_/g' \
| tr -c -d '[:print:]' \
| sed -r -n 's/.*Version[^0-9]*([0-9]+\.[0-9]+(\.[0-9][0-9]?)?).*/\1/p'

The overall command is then wrestool --extract --raw --type=version inputfile.exe | tr '\0, ' '\t.\0' | sed 's/\t\t/_/g' | tr -c -d '[:print:]' | sed -r -n 's/.*Version[^0-9]*([0-9]+\.[0-9]+(\.[0-9][0-9]?)?).*/\1/p'.

  • 1
    +1 wrestool is provided by the icoutil package which is available as a standard Debian package since way back.
    – tripleee
    May 9, 2014 at 7:52
  • you may make it simpler by just pipe it through | hexdump -C
    – Tomofumi
    Jan 30, 2015 at 2:28
  • In Ubuntu 18.04 it is inside the icoutils package. May 20, 2019 at 8:09

As an alternative to using tr and sed to parse the output from @mechanical-snail 's solution, here is a GNU strings and GNU grep version:

$ wrestool --extract --raw --type=version putty.exe | strings -el | grep Version -A 1

Release 0.65
Release 0.65


Another alternative is a recent version of exiftool by Phil Harvey (it is based on perl, easy to install with sudo apt-get install libimage-exiftool-perl, also available for Mac and Windows). It has lots of formatting options.

# Example with exiftool 10.47
$ exiftool -FileVersion -ProductVersion putty.exe

File Version                    : Release 0.67
Product Version                 : Release 0.67
  • What package in Ubuntu/Debian has exiftool? Looks like libimage-exiftool-perl?
    – Xen2050
    Oct 30, 2018 at 14:06
  • I just download the source code and build it locally. Download the tar.gz file from the website (The "Download Version xx.yy" link at the top of owl.phy.queensu.ca/~phil/exiftool), extract the files and see the INSTALLATION section of the README file for how to build it using perl and then installing it to /usr/local/bin
    – dcg
    Jan 26, 2019 at 5:19
  • Would never expect exiftool to handle executables...
    – Ruslan
    Jan 22, 2022 at 13:56
  • exiftool is very powerful!
    – FedKad
    Mar 1, 2023 at 12:31

If you install the gnome-exe-thumbnailer package, you can simply look at the version number in nautilus, caja ,nemo and thunar.

The code to do this manually is available in /usr/bin/gnome-exe-thumbnailer.sh

  • @Scott.. Thanks. it works.. the relevant code is very simple to use in another script... I assume that what you mean by "you can simply look at the version number in nautilus", is that that the version number appears grafted into the .exe's icon in Nautilus.. an interesting idea.. Personally, I rarely use the icon-view, but the code snippet is great for me..
    – Peter.O
    Aug 13, 2011 at 12:09

For the sake of completeness, here's something you can do if you can't install new applications, but you do have p7zip and Vim:

  1. Extract the metadata with 7z x whatever.exe .rsrc/VERSION/1
  2. Open the resulting .rsrc/VERSION/1 file in Vim
  3. Type :e ++enc=utf16le at the Vim command line to request that the file's contents be reinterpreted as little-endian UTF-16.

The method mentioned in @ssokolow's answer does not work exactly for me.

However, the 7z's (version 16.02 or above) "list" option will list that information already.

So, I defined the following Bash function:

function lspe
  7z l "$1" | sed -n -e '/^Comment =/,/^$/ p' | sed 's/^Comment = //'

You can put this function in your .bash_aliases file and use like this:

lspe executable.exe

I just found out myself how to create a nice python dict with the information (I was looking around myself and wound up here for some reason) and would like to present my method here:
Github Gists - spookyahell/exe2version_info.py

'''Licensed under the MIT License :)'''

import pefile
import pprint
pe =  pefile.PE('example.exe')

string_version_info = {}

for fileinfo in pe.FileInfo[0]:
    if fileinfo.Key.decode() == 'StringFileInfo':
        for st in fileinfo.StringTable:
            for entry in st.entries.items():
                string_version_info[entry[0].decode()] = entry[1].decode()


I am licensing it under the MIT License... may anybody who feels the need to create useful scripts or other things with it...

And see Github Gists - spookyahell/peinfo.py for an example implementation of this method in another script...

  • Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Jan 1, 2019 at 6:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .