LinuxQuestions.org
Help answer threads with 0 replies.
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 10-01-2008, 03:15 AM   #1
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 137

Rep: Reputation: 15
how can I tell if my kernel is 32 or 64 bit?


Hi

if I do a uname -a I get:
Code:
# uname -a
Linux oracle.koti 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 athlon i386 GNU/Linux
although I am not certain if that is sufficient to tell

thanks :-)
 
Old 10-01-2008, 03:43 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Have a look at the actual configuration file - this will either be available in /boot/config-$(uname -r) or else via /proc/config.gz

Note that a 64-bit kernel for AMD64/EMT64 can be configured to have a 64-bit and 32-bit API (to support 32-bit libs and apps). These settings are from a 64-bit kernel with support for the 32-bit API in addition to the 64-bit:

CONFIG_X86_64=y
CONFIG_64BIT=y
CONFIG_X86=y
 
Old 10-01-2008, 04:04 AM   #3
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 137

Original Poster
Rep: Reputation: 15
Hi

Quote:
Originally Posted by pinniped View Post

Note that a 64-bit kernel for AMD64/EMT64 can be configured to have a 64-bit and 32-bit API (to support 32-bit libs and apps). These settings are from a 64-bit kernel with support for the 32-bit API in addition to the 64-bit:

CONFIG_X86_64=y
CONFIG_64BIT=y
CONFIG_X86=y
ok ... good to know. I got this information:

CONFIG_X86=y

and additionally:

# grep 64 /boot/config-2.6.9-22.ELsmp
CONFIG_HIGHMEM64G=y
# CONFIG_BLK_DEV_CMD640 is not set
CONFIG_BLK_DEV_CMD64X=y
CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
CONFIG_IP6_NF_MATCH_EUI64=m
# CONFIG_R3964 is not set
CONFIG_AGP_AMD64=y
CONFIG_SENSORS_RTC8564=m
CONFIG_NLS_CODEPAGE_864=m

so I am "not sure" but I think its 64 bit ...
 
Old 10-01-2008, 04:26 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
Quote:
Originally Posted by pellicle View Post
Hi

if I do a uname -a I get:
Code:
# uname -a
Linux oracle.koti 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 athlon i386 GNU/Linux
although I am not certain if that is sufficient to tell

thanks :-)
That kernel is clearly not 64-bit. If it were 64-bit it would say something more like:

Code:
Linux demonslayer 2.6.24.7 #1 SMP Sat Sep 20 18:44:11 EEST 2008 x86_64 x86_64 x86_64 GNU/Linux
 
Old 10-01-2008, 04:37 AM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Since the kernel version has i386 and i686 mentioned, and you don't have:

CONFIG_X86_64=y

then you definitely have a 32-bit kernel (as H_TeXMeX_H already said). You should have had other CPU configuration information in the config file to tell you exactly what family/sub-family of CPU the kernel was configured for - the kernel version information is vague since it refers to i386 as well as i686.
 
Old 10-01-2008, 08:37 AM   #6
pellicle
Member
 
Registered: Jul 2008
Location: Finland
Distribution: RHEL4
Posts: 137

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by H_TeXMeX_H View Post
That kernel is clearly not 64-bit. If it were 64-bit it would say something more like:

Code:
Linux demonslayer 2.6.24.7 #1 SMP Sat Sep 20 18:44:11 EEST 2008 x86_64 x86_64 x86_64 GNU/Linux
bewdy ...thanks for making that clear!

:-)
 
Old 10-01-2008, 12:13 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
Quote:
Originally Posted by pinniped View Post
the kernel version information is vague since it refers to i386 as well as i686.
according to the man page it's in order

Code:
machine		processor	hardware-platform
i686		athlon 		i386
 
Old 10-02-2008, 11:14 AM   #8
kenwood
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by pellicle View Post
Hi

if I do a uname -a I get:
Code:
# uname -a
Linux oracle.koti 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 athlon i386 GNU/Linux
although I am not certain if that is sufficient to tell

thanks :-)
Just to add a few more quick notes that I found helpful

uname ľa will show you the OS version running

getconf LONG_BIT will show you the number of bits in a LONG, which typically matches the architecture type of the OS (i.e. 32 bits for a 32 bit OS and 64 bits for a 64 bit OS).

cat /proc/cpuinfo will show you the processor information.

The first two will only tell you what the OS is capable of, not what the hardware is, the last will tell you what the processor is specifically regardless of OS.

:k
 
Old 10-02-2008, 11:47 AM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
Quote:
Originally Posted by kenwood View Post
getconf LONG_BIT will show you the number of bits in a LONG, which typically matches the architecture type of the OS (i.e. 32 bits for a 32 bit OS and 64 bits for a 64 bit OS).
That is interesting, I didn't know that. Thanks for the info.
 
  


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
how to check linux kernel is 32 bit or 64 bit surprise_frnd Linux - General 13 10-16-2012 09:55 AM
compiling 64 bit kernel in 32 bit linux MadnessASAP Linux - Hardware 6 05-04-2009 11:47 AM
How do I tell if my kernel is 32 bit or 64 bit? SimGuy Linux - Newbie 3 07-02-2008 11:23 AM
32 bit kernel on 64 bit AMD machine dipsae Linux - Software 5 10-01-2004 10:03 AM
32-bit or 64-bit linux kernel ??? gsundeep Linux - General 2 04-24-2003 08:43 PM

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

All times are GMT -5. The time now is 04:44 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration