LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-30-2008, 01:43 AM   #1
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Command to show if OS is 32bit or 64bit??


I have Ubuntu 7.10 Gutsy Gibbon installed on a machine with an Intel E2140 64bit Dual Core processor.

Is there a command I can run to show what version, 32bit or 64bit, of the Gutsy Gibbon I have installed. I think it's 32bit, but I can't for the life of me find anything to verify that.

uname -a shows:
Linux bs-ubuntu64 2.6.22-15-generic #1 SMP Wed Aug 20 15:47:07 UTC 2008 x86_64 GNU/Linux

I named it bs-ubuntu64, but I don't recall knowing for sure that it was a 64bit version of the OS. I think the x86_64 there is just about the processor.

Thanks for any enlightenment...
 
Old 09-30-2008, 02:18 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
The x86_64 means it was built for the AMD64 (and Intel EMT64) - otherwise you'd see i386 or i686.
You can also look at the kernel configuration in /boot/config-$(uname -r)
 
Old 09-30-2008, 02:58 AM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 47
Ok... interesting.

So, are you saying that the x86_64, in the uname command, describes the GNU/Linux part of that output, saying the installed GNU/Linux is 64bit?

Also, that config files has about 42 brazillion lines in it!! ;-)

A couple of them are:
CONFIG_64BIT=y
CONFIG_RESOURCES_64BIT=y

That looks promising for a 64bit verification, but I'm still curious if there is some ubuntu specific command that will say, without having to decrypt a bunch of lines in a config file, "Hey, your version of unbuntu is a 64bit version."

After I posted this thread, as I was still scrounging around the room, I found the CD that says "Ubuntu 7.10 for your 64-bit PC". It's been a while and I just didn't recall the version.

But, this is still a valid question about finding a command to verify the 'bit' version.

Thanks . . .
 
Old 09-30-2008, 03:43 AM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Well, the other thing to check is your libc:

dpkg -s libc6 | grep Arch

There should also be an "arch" or a "mach" command - my system doesn't have either. In fact, "man -k arch" suggests that I have arch (1), but "man arch" or "man 1 arch" tells me there is no documentation for "arch". grrrr...

If you have a compiler installed you can also do:
gcc -V|grep Target
 
Old 09-30-2008, 04:16 AM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 47
Well, that's weird, that dpkg command gives me:

bs@bs-ubuntu64:~$ dpkg -s libc6 | grep Arch
Architecture: amd64

The processor is definitely an Intel E2140.

And, even there, it looks like that's just telling me about the processor, which I know is 64bit.

I guess the bottom line here is to be able to interpret, from my previous post and this one, the results of these outputs to know if it's talking about the OS 'bit'ness or the CPU architecture.

(Keeping in mind you can run a 32bit OS on a 64bit machine... for the benefit of others who happen across this thread.)
 
Old 09-30-2008, 11:33 AM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by itsjustme View Post
Architecture: amd64

The processor is definitely an Intel E2140.
That seems right; AMD put the 64 bit x86 arch out there first (allegations are that Intel could have been first, but were too interested in protecting their Itanium business) and, in order that they were both compatible, Intel copied. So the Intel version is AMD64, in broad architectural terms - the microarchitecture is entirely different, of course.
 
Old 09-30-2008, 02:59 PM   #7
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
The x86_64 in the uname output describes the hardware platform which you already know is x86_64. The output of uname -a is the kernel name, the network node hostname, the kernel release, the kernel version, the machine hardware name, the processor type or "unknown", the hardware platform or "unknown", and the operating system. The bs-ubuntu64 is good indication that it's a 64-bit OS, but the CONFIG_64BIT=y is the sure give away.
 
Old 09-30-2008, 03:16 PM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by itsjustme View Post
bs@bs-ubuntu64:~$ dpkg -s libc6 | grep Arch
Architecture: amd64

The processor is definitely an Intel E2140.

And, even there, it looks like that's just telling me about the processor, which I know is 64bit.
I'm pretty sure that is tell you software (not hardware) has "Architecture: amd64".

Quote:
(Keeping in mind you can run a 32bit OS on a 64bit machine.
To check whether the hardware is 64 bit, I would look for "lm" in the flags line in the output from
cat /proc/cpuinfo

Quote:
Originally Posted by weibullguy View Post
The x86_64 in the uname output describes the hardware platform
I'm pretty sure you're wrong. The x86_64 in uname output has matched the software (kernel) wherever I've seen uname output. I have certainly done uname on 64 bit hardware running a 32 bit kernel and uname did not say "x86_64".
 
  


Reply



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
32bit(i386) or 64bit(amd64) on an amd 64bit cpu (amd 6000+)? d-_-b Debian 7 10-28-2007 07:48 PM
32Bit or 64bit? astrotrain1 Linux - Hardware 6 06-26-2006 01:27 PM
can 64bit processor run both 64bit and 32bit computers? DJOtaku Linux - General 4 09-08-2005 08:14 PM
64bit or 32bit ginger.fish0 Ubuntu 3 09-01-2005 05:12 PM
32Bit or 64Bit? bchivers Mandriva 9 05-22-2005 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:17 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
Open Source Consulting | Domain Registration