LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-01-2009, 09:56 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Rep: Reputation: 30
'x86' vs 'x86-64' ?


Dear Friends ,

What is the basic difference of 'x86' and 'x86-64' ? In my Linux server , using which command I can understand that my server supports either 'x86' or 'x86-64' architecture ?
 
Old 12-01-2009, 10:11 PM   #2
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
x86 - 32bit
x86_64 - 64bit
 
Old 12-01-2009, 10:17 PM   #3
ofaring
Member
 
Registered: Feb 2006
Location: Ontario, Canada
Distribution: Debian, sometimes BSD.
Posts: 44
Blog Entries: 13

Rep: Reputation: 21
It's late here. My mind isn't recalling a single command to tell you that, but it's all in the CPU, so to speak. (Assuming a Linux distro.)

Code:
cat /proc/cpuinfo
And check the "vendor_id" and the "model name". Go to the manufacturer website (almost certainly intel or amd) and lookup the specific info on that processor. They will tell you what its capabilities are (32 bit or 64 bit).
 
Old 12-01-2009, 10:35 PM   #4
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
You can find out which version you are running by typing:
Code:
arch
 
Old 12-02-2009, 02:27 AM   #5
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by ~sHyLoCk~ View Post
You can find out which version you are running by typing:
Code:
arch
I didn't know about that, thanks.

However for the processor, you'll indeed have to check /proc/cpuinfo like ofaring says.
 
Old 12-02-2009, 05:02 AM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,031
Blog Entries: 52

Rep: Reputation: Disabled
Look for lm in the flags after running cat /proc/cpuinfo, that indicates a 64 bit processor.
 
Old 12-02-2009, 06:06 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
arch, uname, etc. will tell you about your OS, not about your machine. Since x86_64 based cpus can run x86 based software, these commands tell you nothing conclusive.

bianL has the right answer, use this command and seach for "lm" in the flag list. "lm" stands for "long mode" and means that your cpu has 64 bit extensions.

Code:
grep flags /proc/cpuinfo
 
Old 12-02-2009, 06:24 AM   #8
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,019

Rep: Reputation: 63
Quote:
Originally Posted by shipon_97 View Post
Dear Friends ,

What is the basic difference of 'x86' and 'x86-64' ? In my Linux server , using which command I can understand that my server supports either 'x86' or 'x86-64' architecture ?
Follow instructions from brianl and i92guboj.These are specific answer.
Code:
grep flags /proc/cpuinfo
x86=32 bit
x86_64=64 bit machine
 
Old 12-02-2009, 01:56 PM   #9
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by brianL View Post
Look for lm in the flags after running cat /proc/cpuinfo, that indicates a 64 bit processor.
I didn't know that either, thanks.

You could probably run:

Code:
grep -o " lm " /proc/cpuinfo
If it says:

Code:
bash-3.1$ grep -o " lm " /proc/cpuinfo
 lm 
 lm 
 lm 
 lm
one 'lm' per processor. Be careful because there's also 'lahf_lm', which is different and does not imply 64-bit.
 
Old 12-02-2009, 03:05 PM   #10
jefro
Guru
 
Registered: Mar 2008
Posts: 11,552

Rep: Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406
"my server supports either 'x86' or 'x86-64' architecture"

I might go one step further and suggest that the entire system may have to be looked at to determine if a 64 bit distro is fully supported.
 
Old 12-02-2009, 03:14 PM   #11
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,087

Rep: Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110
Quote:
Originally Posted by shipon_97 View Post
What is the basic difference of 'x86' and 'x86-64' ?
The big difference is 32 bit vs. 64 bit. There are other differences as well.

Quote:
which command I can understand that my server supports either 'x86' or 'x86-64' architecture ?
"server" might mean your hardware or software or both. So those who replied earlier told you both how to find out whether your hardware supports both x86 and x86-64 architectures and whether your Linux kernel supports x86-64

The lm flag in /proc/cpuinfo means the hardware supports both. Lacking the lm means the hardware does not support x86-64.

The x68_64 that appears in the result of any of the commands
uname -a
uname -p
uname -i
uname -m
arch

means your Linux kernel supports x86-64. Lacking that "x86_64" means the kernel does not support x86-64. (You only need one of those commands. They will all say x86_64 or none of them will say x86_64).

Any hardware that supports x86-64 also supports x86.

I think any Linux kernel that support x86-64 also supports x86 user programs, but a Linux distribution including an x86-64 kernel might not support x86 user programs (most such distributions do support x86 user programs, but it is possible for a distribution to not support x86).

Last edited by johnsfine; 12-02-2009 at 03:16 PM.
 
Old 12-02-2009, 04:05 PM   #12
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by johnsfine View Post
I think any Linux kernel that support x86-64 also supports x86 user programs,
As long as it has been compiled with IA32_EMULATION enabled.

Quote:
but a Linux distribution including an x86-64 kernel might not support x86 user programs (most such distributions do support x86 user programs, but it is possible for a distribution to not support x86).
The support in the userland is basically provided by making present the relevant libraries for 32 bits. The only thing you need os to add the directories containing the 32 bits libs to the LD_LIBRARY_PATH, that's usually done by adding them to /etc/ld.so.conf or similar.

However, if the distro has not at least some basic support (at least a multilib'ed glibc/libc6) it soon becomes a pain to maintain.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Sabayon Linux x86/x86-64 5.o GNOME and KDE Released LXer Syndicated Linux News 0 10-02-2009 06:21 PM
build x86-64 application on 32-bit machine using x86-64 toolchain linuxgentoo Linux - General 16 06-03-2009 03:15 AM
LXer: Sabayon Linux x86/x86-64 3.5 Stable release LXer Syndicated Linux News 0 07-03-2008 12:00 AM
LXer: Sabayon Linux x86/x86-64 3.5 Loop 2: Beta Release LXer Syndicated Linux News 0 03-17-2008 06:41 PM
Boot x86 target from flash, with the image and file system on the x86 host. batsayan Linux - Software 2 08-23-2005 12:09 AM


All times are GMT -5. The time now is 09:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration