Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to check if my software is x64 or x32 bit (not os) this software is a executable file and when I check about no information is given if it is 64 or 32

so does anyone knows how to check if my software is x64 or 32

thank you in advanced

share|improve this question

3 Answers 3

up vote 15 down vote accepted

You can use the file command to check out what format has that executable. For example:

file /usr/bin/gedit
/usr/bin/gedit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x5a388215eb6f60b420fc3b6d68ec52d563071f84, stripped
share|improve this answer
    
Thanks you very much –  Levan Mar 22 at 20:41

This simple command will show you whether the executable file is 32 bit(i386) or 64 bit(amd64) .

Syntax:

apt-cache show $(dpkg -S /path/to/the/file | awk -F ':' '{print $1 }') | awk '/Architecture:/ {print $2}' -

Example:

$ apt-cache show $(dpkg -S /usr/bin/gedit | awk -F ':' '{print $1 }') | awk '/Architecture:/ {print $2}' -
amd64

Explanation:

dpkg -S command grabs the package in which the file actually belongs to.apt-cache show package command will shows the details about the package.From that details, awk grabs only the Architecture part and redirects it to stdout.

OR

You can try this command also,

$ dpkg -l $(dpkg -S /usr/bin/gedit | awk -F ':' '{print $1 }') | awk '/ii/ {print $4}'
amd64
share|improve this answer
1  
cut -d: -f1 would be shorter here, and note that this only works for installed packages, not some random file in your home folder. Perhaps xargs -r is more appropriate in case the dpkg -S command returns empty. –  Lekensteyn Mar 23 at 10:07

It's way easier than that.

Just go to This PC, right-click and select properties. The system type will be listed there.

share|improve this answer
    
Your post sounds to windows platform and not about Ubuntu –  KasiyA Sep 6 at 16:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.