Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I do a cat in /proc/cpuinfo it shows a line with clflushsize : 64

Does this mean my kernel is running in 64 bits?

share|improve this question

4 Answers 4

up vote 15 down vote accepted
uname -a

will tell you the kernel - the end bit tells you the architecture.

Two examples:

My mac:

Darwin Mac.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

My Dreamhost hosting:

Linux ecco 2.6.24.5-serf-xeon-c6.1-grsec #1 SMP Tue Oct 7 06:18:04 PDT 2008 x86_64 GNU/Linux

i386 = 32 bit

x86_64 = 64 bit

share|improve this answer

uname -m will give you the architecture you kernel is compiled for. If it prints i686 then your kernel is 32 bit, if x86_64 then it's 64 bit, assuming you have an Intel/AMD chip.

share|improve this answer
    
Could also be i386 on older 32-bit platforms (and I have even seen some packages compiled for i586 - not sure if that would ever be output by uname, though) –  a_m0d Aug 26 '09 at 11:55

I think the most precise way is

getconf LONG_BIT

here it exactly shows 64

found on this tip

getconf is from package libc-bin (on ubuntu)

share|improve this answer

If you want to see only the platform that you are running on, you can use

uname -i

The full list of supported options for uname is

$ uname --help
Usage: uname [OPTION]...
Print certain system information.  With no OPTION, same as -s.

  -a, --all                print all information, in the following order,
                             except omit -p and -i if unknown:
  -s, --kernel-name        print the kernel name
  -n, --nodename           print the network node hostname
  -r, --kernel-release     print the kernel release
  -v, --kernel-version     print the kernel version
  -m, --machine            print the machine hardware name
  -p, --processor          print the processor type or "unknown"
  -i, --hardware-platform  print the hardware platform or "unknown"
  -o, --operating-system   print the operating system
      --help     display this help and exit
      --version  output version information and exit
share|improve this answer
    
uname -i prints GenuineIntel, which isn't really what he's looking for. –  spatz Aug 26 '09 at 11:58
    
and Unknown on a Mac. –  Rich Bradshaw Aug 26 '09 at 12:07
    
prints i386 on my machine! –  a_m0d Aug 27 '09 at 1:46

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.