LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 05-19-2009, 08:42 AM   #1
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 165
Thanked: 21
32 bit or 64 bit


[Log in to get rid of this advertisement]
is there any way/command to find that the linux machine is a 32 bit or 64 bit
PMP is offline  
Tag This Post , , ,
Reply With Quote
Old 05-19-2009, 08:47 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Karmic, CentOS 5.4
Posts: 2,487
Thanked: 158
You can find what version of kernel you are using by uname -a or uname -m
linuxlover.chaitanya is offline     Reply With Quote
Old 05-19-2009, 08:48 AM   #3
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 165
Thanked: 21

Original Poster
it says i686 now what type of machine is it
PMP is offline     Reply With Quote
Old 05-19-2009, 08:53 AM   #4
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,127
Thanked: 463
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 08:54 AM..
colucix is offline     Reply With Quote
Old 05-19-2009, 08:53 AM   #5
repo
Senior Member
 
Registered: May 2001
Location: Belgium
Distribution: Debian/GNU Linux
Posts: 4,504
Thanked: 441
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
repo is offline     Reply With Quote
Thanked by:
Old 05-19-2009, 08:53 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Karmic, CentOS 5.4
Posts: 2,487
Thanked: 158
Mine also says i686 and is 32bit.
linuxlover.chaitanya is offline     Reply With Quote
Old 05-19-2009, 09:24 AM   #7
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 165
Thanked: 21

Original Poster
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
PMP is offline     Reply With Quote
Old 05-19-2009, 09:25 AM   #8
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 165
Thanked: 21

Original Poster
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
PMP is offline     Reply With Quote
Old 05-19-2009, 09:30 AM   #9
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,127
Thanked: 463
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.
colucix is offline     Reply With Quote
Thanked by:
Old 05-19-2009, 09:31 AM   #10
repo
Senior Member
 
Registered: May 2001
Location: Belgium
Distribution: Debian/GNU Linux
Posts: 4,504
Thanked: 441
the processor is 64 bit
the kernel is 32 bit
repo is offline     Reply With Quote
Thanked by:
Old 05-19-2009, 09:35 AM   #11
ermoreno
LQ Newbie
 
Registered: May 2009
Location: San Antonio, Texas
Distribution: CentOS, SunOS
Posts: 5
Thanked: 0
On my CentOS boxes I look in root and If I see a lib64 directory then it is 64 bit.
ermoreno is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 01:20 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration