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

Notices


Reply
  Search this Thread
Old 03-30-2010, 05:01 PM   #1
ashikuzzaman
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
How Do I Know my Red Hat is 32 bit or 64 bit OS?


I am using Red Hat 4.7 Enterprise Edition. I want to know what command will tell me if my OS (i.e. Kernel I guess) is 32 bit or 64 bit?

I ran the command uname -a and it shows me the following output.

Linux auzzaman-lnx 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:39:47 EDT 2008 i686 i686 i386 GNU/Linux

Don't know how to read it for that. I also ran the command cat /proc/version and also don't know the result it shows below gives any clue or not.

Linux version 2.6.9-78.ELsmp (brewbuilder@hs20-bc2-3.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Wed Jul 9 15:39:47 EDT 2008
 
Old 03-30-2010, 05:26 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
i386 and i686 are 32 bit processors. So it looks as though you are running 32 bit RH.

Welcome to LQ
 
Old 03-30-2010, 05:34 PM   #3
knarfling
LQ Newbie
 
Registered: Aug 2006
Distribution: RHEL, Fedora
Posts: 11

Rep: Reputation: 1
You can also do uname -i
Yours will probably respond with i386
If you had a 64 bit version of the OS installed, it would respond with x86_64
 
Old 03-31-2010, 03:28 AM   #4
prpednek
LQ Newbie
 
Registered: Mar 2010
Location: India
Distribution: RHEL
Posts: 22

Rep: Reputation: 16
Quote:
Originally Posted by knarfling View Post
You can also do uname -i
Yours will probably respond with i386
If you had a 64 bit version of the OS installed, it would respond with x86_64
The command 'arch -k' also displays the architecture of your machine.
 
Old 03-31-2010, 03:45 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
This will show whether the OS is 32 or 64
Quote:
#file /usr/bin/file
Output:-
Quote:
/usr/bin/file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

Last edited by kirukan; 03-31-2010 at 03:47 AM.
 
Old 04-01-2010, 01:37 PM   #6
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
...

Last edited by DrLove73; 04-01-2010 at 01:38 PM.
 
Old 04-01-2010, 02:04 PM   #7
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 ashikuzzaman View Post
Linux auzzaman-lnx 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:39:47 EDT 2008 i686 i686 i386 GNU/Linux
As Xavier told you, that is 32 bit.

Quote:
Originally Posted by prpednek View Post
The command 'arch -k' also displays the architecture of your machine.
man arch tells us
Code:
 arch is deprecated command since release util-linux 2.13. Use uname -m.
But so far as I know, arch still works.

Quote:
Originally Posted by kirukan View Post
This will show whether the OS is 32 or 64
Code:
file /usr/bin/file
That's the answer I really don't like.

That tells you whether /usr/bin/file is a 32 bit or 64 bit executable. Assuming the command works and says 64 bit, you can be pretty sure the Linux kernel is 64 bit. But if the answer is 32 bit, it is still quite possible for the Linux kernel to be 64 bit.

Stick with the direct method (uname -m or similar).
 
Old 01-15-2014, 09:50 AM   #8
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Rep: Reputation: Disabled
# getconf LONG_BIT
 
Old 03-29-2017, 10:17 AM   #9
rew
Member
 
Registered: May 2010
Posts: 36

Rep: Reputation: 3
Quote:
Originally Posted by johnsfine View Post
That tells you whether /usr/bin/file is a 32 bit or 64 bit executable. Assuming the command works and says 64 bit, you can be pretty sure the Linux kernel is 64 bit. But if the answer is 32 bit, it is still quite possible for the Linux kernel to be 64 bit.

Stick with the direct method (uname -m or similar).
On my system where I WANT the answer: "32 bit" as my OS is 32 bit, uname -m tells me it is 64-bit, but the file command more-or-less correctly tells me "32-bit".

I'm still looking for something that returns a concise and correct "i386"...

(My machine is 64-bit capable, runs a 64-bit kernel, but has a 32-bit userspace. The reason for this is that I need this machine to compile 32-bit binaries for other systems that may not be 64-bit capable. The reason it runs a 64-bit kernel is that the kernel becomes terribly slow when you have a 32-bit kernel and have 16G ram).

Edit: Too quick in replying... T-Dub116 has the winning trick. (for me). :-)

Last edited by rew; 03-29-2017 at 10:18 AM.
 
Old 03-29-2017, 12:29 PM   #10
un1x
Member
 
Registered: Oct 2015
Posts: 645

Rep: Reputation: Disabled
Exclamation

Did u realize the date of post ? ? ?

do not necrobump plz !
 
  


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
[SOLVED] how to run 32 bit apps on 64 bit red hat 5 unix1adm Red Hat 20 08-11-2009 12:22 AM
looking for ISOS of red hat 7.3 for 64 bit fabmejia Linux - Distributions 2 05-07-2007 05:58 PM
How to use Bit Torrent in Red Hat??? bobthebullet990 Linux - Software 4 04-29-2006 10:43 AM
Red Hat i386 32 bit upgrade to Red Hat IA64 bit louisb Linux - Enterprise 4 10-08-2005 01:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:52 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