Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Determine Linux Server’s Architecture (32 or 64 bit)

I want to install a package and it has a version for 32-bit ubuntu and 64-bit. How can I tell which one is running on my server?

share|improve this question

marked as duplicate by Mark Henderson, womble, John Gardeniers, Zypher, Chopper3 Jan 3 '10 at 11:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    

5 Answers 5

up vote 0 down vote accepted

If you want to check the version of the package and not the version of the server, do either one of the following commands:

dpkg -s <packagename>
dpkg -p <packagename>

to print out the details of the package. For example, it will look like this:

$ dpkg -s zip
Package: zip
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 644
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 3.0-1ubuntu1
Replaces: zip-crypt (<= 2.30-2)
Depends: libc6 (>= 2.7)
Recommends: unzip
Conflicts: zip-crypt (<= 2.30-2)
Description: Archiver for .zip files
 This is InfoZIP's zip program. It produces files that are fully
 compatible with the popular PKZIP program; however, the command line
 options are not identical. In other words, the end result is the same,
 but the methods differ. :-)
 .
 This version supports encryption.
Original-Maintainer: Santiago Vila <sanvila@debian.org>
share|improve this answer

You know when you're typing out a question it lists similar ones? Well it makes sense to look at them in case the question has been asked before;

http://serverfault.com/questions/61673/determine-linux-servers-architecture-32-or-64-bit

share|improve this answer
    
How about contributing a vote to close as exact duplicate? –  Mark Henderson Jan 3 '10 at 1:55
2  
Nah, making snarky comments-as-answers is far more fun. –  womble Jan 3 '10 at 3:06
    
Sorry farseeker I was posting from my phone (in bed too, which is quite sad really) and it's quite complex to do that in that way. –  Chopper3 Jan 3 '10 at 11:21
    
Thanks for the input guys! –  Joseph Silvashy Jan 5 '10 at 2:46
    
You can't post a comment from your phone, but you can look up a dupe and post an answer? That's one weird phone. –  womble Jan 6 '10 at 9:37

um.. if anyone else wants to know, I figured it out:

uname -m
share|improve this answer
    
even better.... +1 –  cop1152 Jan 3 '10 at 0:19

use the command

uname -a

read the string. It will be near the end. Example:

Linux ora100 2.6.5-7.252-smp #1 SMP Tue Feb 14 11:11:04 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux

share|improve this answer
    
On what distribution did you get that result? I get a different result than yours but all the same from my laptop and three of my servers. Or is the fact that it says i686 the give away to 32 bit? [Mepis] Linux MOBIL-01 2.6.27-1-mepis-smp #1 SMP PREEMPT Mon Oct 12 21:22:47 EDT 2009 i686 GNU/Linux [CentOS] Linux SHODAN 2.6.18-164.9.1.el5 #1 SMP Tue Dec 15 21:04:57 EST 2009 i686 i686 i386 GNU/Linux [two X Debian] Linux BOSS 2.6.26-2-486 #1 Wed Nov 4 20:19:07 UTC 2009 i686 GNU/Linux Linux ARDVARC 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 GNU/Linux –  Nunya Jan 3 '10 at 4:42

If you have a 64bit server, it can run either one (32 or 64) but I would stick with 64bit whenever possible. And Ubuntu usually sticks with the one that it was installed with in my case.

share|improve this answer

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