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.

What command do I type in to check this?

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

Is this a Linux server? If so, try uname -p

Example:

$ uname -p
x86_64

Note that this only tells you about the Linux kernel, not any particular user-land software (e.g. you can still run 32-bit MySQL on 64-bit Linux). And you could be running 32-bit Linux on a 64-bit CPU.

share|improve this answer
    
D'oh. I just saw the "linux" tag, so of course it's a Linux server :-). –  Matt Solnit Oct 8 '09 at 21:37
add comment

You could also check the cpuinfo and look for the "lm" (long mode) flag

less /proc/cpuinfo

output:

flags : ... lm ....

a 32-bit processor won't have this flag.

share|improve this answer
1  
Could be a 32-bit distribution on a 64-bit processor –  Julien Oct 8 '09 at 23:34
    
Look at this thread: serverfault.com/questions/27590/… –  jomey Oct 9 '09 at 0:19
add comment

In addition to Matt's answer about your kernel, if you're running a Red Hat/CentOS RPM-based distro (which is what most of Rackspace is, typically) you can check the installed userland tools for their bitness with this command:

rpm -qa --queryformat='%{n}-%{v}-%{r}.%{arch}\n' | sort

You're looking for .i386 or .x86_64 on the end. It's entirely possible to have a mix of 32bit and 64bit on a 64bit install based on needs of the server.

share|improve this answer
add comment

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.