LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 04-29-2008, 07:11 AM   #1
lel4866
LQ Newbie
 
Registered: Jan 2005
Location: Raleigh, NC, USA
Distribution: Ubuntu 8.04
Posts: 5

Rep: Reputation: 0
How do i tell if 32 bit or 64 bit ubuntu is installed on a machine?


I've tried all the uname options. uname -m says "x86_64", but that might just be describing the hardware, not the software. In /boot, in config-2.6.24-16, CONFIG_64BIT=Y, so maybe that means it's 64-bit?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-29-2008, 08:21 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
Try 'cat /proc/version' and see if the linux version info says amd64 or not.

Another option would be to fire up synaptic or something and see what version(s) of 'linux-image' (the kernel package) you have installed, assuming the kernel is a stock one and not manually compiled.
 
Old 04-29-2008, 09:11 AM   #3
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by lel4866 View Post
I've tried all the uname options. uname -m says "x86_64", but that might just be describing the hardware, not the software.
That is describing the software.

So you have a 64-bit kernel.

Quote:
In /boot, in config-2.6.24-16, CONFIG_64BIT=Y, so maybe that means it's 64-bit?
That also means it's 64-bit.
 
Old 04-29-2008, 10:20 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,504

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
"file /sbin/init" will give you a pretty good indication.
 
3 members found this post helpful.
Old 04-29-2008, 04:14 PM   #5
lel4866
LQ Newbie
 
Registered: Jan 2005
Location: Raleigh, NC, USA
Distribution: Ubuntu 8.04
Posts: 5

Original Poster
Rep: Reputation: 0
file /sbin/init gives:

/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped

cat /proc/version gives:

Linux version 2.6.24-16-generic (buildd@yellow) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Thu Apr 10 12:47:45 UTC 2008

So, given other comments, I will assume I have a 64-bit kernel. Which eliminates the need for a backup (right this instant), since I won't be reinstalling.

Thanks to all who chimed in.

Larry Lewis
 
Old 02-22-2010, 09:09 PM   #6
spurnyn
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
What am I runnung?

Please help. I ran all three tests and it looks like they contradict each other. Am I running 32 or 64 bit kernel?

uname -r
2.6.26-2-amd64

CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y

file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped

First two suggest I am running 64 bit.
Third one definitely point to 32 bit.

Thank you.
 
Old 02-22-2010, 10:39 PM   #7
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by spurnyn View Post
Please help. I ran all three tests and it looks like they contradict each other. Am I running 32 or 64 bit kernel?

uname -r
2.6.26-2-amd64
That is conclusive. 64 bit kernel.

Quote:
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
Assuming that is the config for the kernel you're actually running, that is also 64 bit.

Quote:
file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
So init is 32 bit. That is surprising for a Linux distribution with a 64 bit kernel. But it isn't impossible. 32 bit programs can run under a 64 bit kernel.
 
Old 02-23-2010, 12:13 AM   #8
spurnyn
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Thank you for fast response. I am obviously a newbie and have to do more reading. Does it mean that init is not part of the Kernel? Should I worry that it is 32 bit? Would it hunt me later?

Thank you.
 
Old 03-23-2010, 11:29 AM   #9
koinobori
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 1
Quote:
Originally Posted by johnsfine View Post
That is describing the software.

So you have a 64-bit kernel.



That also means it's 64-bit.
uname -m is really describing the SW?

from the manual page :

-m, --machine
print the machine hardware name
 
Old 03-23-2010, 12:33 PM   #10
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,143

Rep: Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127Reputation: 1127
Quote:
Originally Posted by koinobori View Post
uname -m is really describing the SW?
Yes, at least in cases such as X86 vs. X86_64 where different machine architectures could run on the same CPU.

uname -m will definitely say "X86_64" only when the kernel was compiled for X86_64 architecture. It will not give "X86_64" when an X86 kernel is running on X86_64 hardware.

Quote:
from the manual page :

-m, --machine
print the machine hardware name
I don't know whether that documentation is entirely misleading or whether it is just misleading for the question asked in this thread.

Running an old X86 kernel (2.4.21-47.0.1.ELsmp) on an X86_64 CPU, I find that uname -i displays "i386" while uname -m and uname -p each display "i686".

IIUC, that means the kernel was compiled to run on some X86 variant less than "i686" (not really a 386, because in Linux i386 doesn't really mean 386 anymore.) But the kernel can recognize that is running on a processor supporting the "i686" super-set of "i386".

So there can be both a hardware and software component to the information displayed by uname -m or uname -p.

Last edited by johnsfine; 03-23-2010 at 12:35 PM.
 
Old 03-24-2010, 05:17 PM   #11
koinobori
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 1
johnsfine thanks for the expanded explanation about that.
 
1 members found this post helpful.
Old 09-29-2011, 08:10 AM   #12
fredrikl
LQ Newbie
 
Registered: Sep 2011
Posts: 1

Rep: Reputation: Disabled
getconf LONG_BIT
That'll do the trick
 
Old 09-29-2011, 08:18 AM   #13
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,033

Rep: Reputation: Disabled
@spurnyn
You're running a 2.6.26 which is a VERY old kernel. I'd be worried about that. What version of Debian are you running?
ciao,
jdk
 
Old 09-29-2011, 08:55 AM   #14
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Another old thread, jdkaye.
 
1 members found this post helpful.
Old 09-29-2011, 09:35 AM   #15
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,033

Rep: Reputation: Disabled
aaaaaaaarrrrrrrrrrrrrrrgggggggggggggggggghhhhhhhhhhhhhh! I keep getting caught.
Sorry about that. Old thread=old kernel.
jdk
 
  


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
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 03:02 PM
how do I install 32-bit compiler libraries onto a 64-bit machine? charleycat Linux - Software 1 08-16-2007 02:45 PM
Installing 32 bit SUSE 10 in 64 bit machine me4linux Linux - General 2 01-22-2007 02:55 AM
64-bit distro usable with 32-bit machine? JapanMtlExpat Linux - Software 7 10-06-2004 12:53 AM
32 bit kernel on 64 bit AMD machine dipsae Linux - Software 5 10-01-2004 11:03 AM


All times are GMT -5. The time now is 06:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration