LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-19-2009, 07:42 AM   #1
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
32 bit or 64 bit


is there any way/command to find that the linux machine is a 32 bit or 64 bit
 
Old 05-19-2009, 07:47 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
You can find what version of kernel you are using by uname -a or uname -m
 
Old 05-19-2009, 07:48 AM   #3
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Original Poster
Rep: Reputation: 58
it says i686 now what type of machine is it
 
Old 05-19-2009, 07:53 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The uname command tells you if the kernel is 32-bit or 64-bit. i686 means 32-bit (otherwise it would be x86_64). To discover if the CPU is 32 or 64-bit do:
Code:
grep flags /proc/cpuinfo | grep lm
if output is null you have a 32-bit CPU, if output is non null the CPU is 64-bit. lm stats for "Long Mode" that is a feature of 64-bit machines.

Last edited by colucix; 05-19-2009 at 07:54 AM.
 
Old 05-19-2009, 07:53 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
i686 means a 32 bit machine
x86_64 means 64 bit

Code:
grep flags /proc/cpuinfo
lm means Long mode - 64 bit CPU
Real mode 16 bit CPU
Protected Mode is 32-bit CPU
 
Old 05-19-2009, 07:53 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Mine also says i686 and is 32bit.
 
Old 05-19-2009, 08:24 AM   #7
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Original Poster
Rep: Reputation: 58
This is what i get when i do
grep flags /proc/cpuinfo

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr

uname -m gives
i686

Then it should be 64 bit if i am not worng
 
Old 05-19-2009, 08:25 AM   #8
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Original Poster
Rep: Reputation: 58
I am sorry the output was
grep flags /proc/cpuinfo | grep --color lm
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
 
Old 05-19-2009, 08:30 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by PMP View Post
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
You have a 64-bit machine with a 32-bit OS (kernel) installed.
 
Old 05-19-2009, 08:31 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
the processor is 64 bit
the kernel is 32 bit
 
Old 05-19-2009, 08:35 AM   #11
ermoreno
LQ Newbie
 
Registered: May 2009
Location: San Antonio, Texas
Distribution: AIX, RHEL
Posts: 8

Rep: Reputation: 0
On my CentOS boxes I look in root and If I see a lib64 directory then it is 64 bit.
 
  


Reply

Tags
32bit, bit



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
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 02:02 PM
64-bit or 32-bit Application on 64-bit Linux jjana123 Linux - General 4 05-06-2008 05:27 PM
Triple Boot Suse 10.3 32 bit, suse alpha 11.0 64 bit and Windows XP (32 Bit) 1kyle SUSE / openSUSE 1 02-28-2008 10:25 AM
LXer: Install Xen 3.1 Solaris domU (64 bit) under CentOS 5 dom0 (64 bit) LXer Syndicated Linux News 0 09-21-2007 12:00 AM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:24 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration