how to find If my linux OS is 64 bit or 32 bit system

I know how to do in Solaris.
Is there a command similar to solaris'?


I am looking for a quick answer here, that's why I offer 250 pts.
LVL 23
seazodiacAsked:
Who is Participating?
 
e-tsikConnect With a Mentor Commented:
Hi :-)

Two ways:
1.
uname -m

If it returns somthing like i386, i486 (i.86) - it is 32 bit.
Itanium processors return x86_64

2.
int a;
if sizeof(a) == 4 {
  // 32 bit
} else {
  // 64 bit
}
0
 
jlevieConnect With a Mentor Commented:
'uname -a' will reveal whether you have a 64bit processor or not. For example the output from that command executed on my Athlon box looks like:

chaos> uname -a
Linux chaos.entrophy-free.net 2.4.21-15.0.3.EL #1 Tue Jun 29 17:55:01 EDT 2004 i686 athlon i386 GNU/Linux
0
 
seazodiacAuthor Commented:
Just where exactly does it show the bit info?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
jlevieConnect With a Mentor Commented:
It  is implicit in the processor type only an Opteron or Itanium is capable of 64bit operation.
0
 
MNGROWCommented:
To display specific info about the cpu try
x86info -a
If you get "command not found" message it means either you don't have this binary on your system, or the path is different.
0
 
MNGROWCommented:
download x86info from  
http://sourceforge.net/projects/x86info/
hope it will work
0
All Courses

From novice to tech pro — start learning today.