Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-09-2008, 11:12 AM
|
#1
|
LQ Newbie
Registered: Sep 2007
Posts: 3
Rep:
|
how to check linux kernel is 32 bit or 64 bit
hi all,
can u tell me how can i find the linux installation is 32bit or 64 bit ...?
i have ran the getconf WORD_BIT and getconf WORD_LENGTH .. i am confused.
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
01-09-2008, 11:30 AM
|
#2
|
Senior Member
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170
|
Usually it is in the name of the kernel.
Tells me I am running a 64bit kernel or check a binary file on the system if it is 64bit good chance you are running 64bit.
Code:
>$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped
|
|
2 members found this post helpful.
|
01-09-2008, 11:47 AM
|
#3
|
LQ Newbie
Registered: Sep 2007
Posts: 3
Original Poster
Rep:
|
Quote:
Originally Posted by HappyTux
Usually it is in the name of the kernel.
Tells me I am running a 64bit kernel or check a binary file on the system if it is 64bit good chance you are running 64bit.
Code:
>$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped
|
Thanks for the quick response ..
If i run file on any x86_64 system's library under /lib is showing 32 bit LSB executable ..
if its x86_64; the library also should be 64bit executable right ...?
pls advice
|
|
|
01-10-2008, 04:39 PM
|
#4
|
Member
Registered: Feb 2004
Distribution: SLES 9
Posts: 112
Rep:
|
I don't think it has to. I run 32bit apps on 64bit kernels. I think you just don't get the performance benefits of running true 64bit code on the kernel.
|
|
|
01-10-2008, 06:01 PM
|
#5
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,333
|
cat /proc/cpuinfo - look for "lm" in the flags
Edit: mmmm; didn't read the question. That'll tell you hardware capability. For the kernel, it's in the config, but recently changed.
Last edited by syg00; 01-10-2008 at 06:03 PM.
|
|
|
01-10-2008, 06:19 PM
|
#6
|
Member
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896
Rep:
|
One certainly can run 32-bit apps on a 64-bit system, if the system is multilib. But you can look at parts of the system itself to verify that it's 64-bit. Like this, for example
Code:
file /sbin/init
/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.16, dynamically linked (uses shared libs), stripped
|
|
|
01-30-2008, 12:26 PM
|
#7
|
Member
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324
Rep:
|
Quote:
#uname -ar
Linux linux 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC i686 i686 i386 GNU/Linux
|
What am I running here? is that 64 bit OS??
Because some of applications acting like it is 64 bit?
Do I need to go back in i386?
my cpu info
Quote:
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
stepping : 10
cpu MHz : 800.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
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 ssse3 cx16 xtpr lahf_lm
bogomips : 3995.43
clflush size : 64
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
stepping : 10
cpu MHz : 800.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
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 ssse3 cx16 xtpr lahf_lm
bogomips : 3990.01
clflush size : 64
|
|
|
|
07-26-2011, 10:30 PM
|
#8
|
Ticketmaster OSS
Registered: Sep 2008
Posts: 4
Rep:
|
Quote:
Originally Posted by knockout_artist
What am I running here? is that 64 bit OS??
Because some of applications acting like it is 64 bit?
Do I need to go back in i386?
my cpu info
|
If it was 64-bit, there would be a 64 in it. i386 is old-school 32-bit for the 386, 486, and early Pentiums and AMD. The i686 tag is modern 32-bit OS that includes extensions and performance-enhancements for most Pentium-class CPUs and AMD processors.
|
|
|
11-10-2011, 05:30 AM
|
#9
|
LQ Newbie
Registered: Nov 2011
Posts: 1
Rep: 
|
To know whether our Linux kernel is 32 bit or 64 bit
To know whether our Linux kernel is 32 bit or 64 bit
Use this command getconf LONG_BIT
|
|
4 members found this post helpful.
|
11-10-2011, 06:22 AM
|
#10
|
Senior Member
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753
|
Quote:
Originally Posted by knockout_artist
What am I running here? is that 64 bit OS??
Because some of applications acting like it is 64 bit?
Do I need to go back in i386?
|
i686, that is 32bit. No need to 'go back' to i386, your CPU has no problems with i686. If its even possible to get an i386 kernel for your distro.....
BTW, "linux 2.6.22.5-31-default", is that openSUSE 10.3? If it is, you should really get a newer version, or a different distro- openSUSE 10.3 has been out of support' for years now (end of life for 10.3 was 31st of October, 2009).
Quote:
Originally Posted by markhud
The i686 tag is modern 32-bit OS that includes extensions and performance-enhancements for most Pentium-class CPUs and AMD processors.
|
Just FYI, the original 'pentium' class intel CPUs are only i586, not i686. The 1st i686 (P6) intel CPU was the Pentium Pro/Pentium II, the 1st AMD i686 CPU was the athlon, and I honestly forget what the 1st i686 VIA/cyrix CPU was.
|
|
|
12-24-2011, 07:19 AM
|
#11
|
LQ Newbie
Registered: Dec 2011
Posts: 2
Rep: 
|
If you want to check you system kernel than if you will use manually code to check it. it may be that code can be wrong or process can be wrong. but if you will use Linux Boot Disk to check your kernel. than you will get right answer.
|
|
|
12-24-2011, 07:52 AM
|
#12
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,971
|
Member response
Hi,
Most Gnu/Linux install CD/DVD provide a means to boot the system. You can then use the booted system to diagnose or work on the system in question. One can look at '/proc/cpuinfo' since the booted kernel provides this information. You can also use ' dmidecode' to identify system information.
|
|
|
04-21-2012, 01:14 AM
|
#13
|
LQ Newbie
Registered: Apr 2012
Posts: 1
Rep: 
|
Command
Quote:
Originally Posted by pavasatya
To know whether our Linux kernel is 32 bit or 64 bit
Use this command getconf LONG_BIT
|
Thank you!
|
|
|
10-16-2012, 10:55 AM
|
#14
|
LQ Newbie
Registered: Oct 2012
Posts: 5
Rep: 
|
Quote:
Originally Posted by HappyTux
Usually it is in the name of the kernel.
Tells me I am running a 64bit kernel or check a binary file on the system if it is 64bit good chance you are running 64bit.
Code:
>$ file /usr/bin/file
/usr/bin/file: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped
|
Sweet thanks!
|
|
|
All times are GMT -5. The time now is 09:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|