Determine whether OS is 32 bit 0r 64


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Determine whether OS is 32 bit 0r 64
# 1  
Old 11-19-2015
Determine whether OS is 32 bit 0r 64

Hi Team,

I need to determine whether my OS is 32 bit or 64 bit.
For linux I am running :-
Code:
bash$ uname -a
Linux xxxx 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

This tells me that Linux is 64 bit as it is x86_64.

For Solaris

Code:
bash$ uname -a
SunOS xxxx 5.10 Generic_142910-17 i86pc i386 i86pc

This is indicating that Solaris is 32 bit
But this command on solaris:-
Code:
bash$ isainfo
amd64 i386

is indicating that my OS is 64 bit.

Could you please help me in understanding this .
And how to check whether processor is 32 bit ?

Thanks
# 2  
Old 11-19-2015
Hello Raj,

Could you please try following command and let me know if this helps.
Code:
 isainfo -b

Thanks,
R. Singh
# 3  
Old 11-19-2015
Hi Ravi,

It gives me the 64 bit.

But why isainfo is showing both amd64 and i386 wheras uname is showin only i386.

Thanks
# 4  
Old 11-19-2015
Hello Raj,

I am on a Solaris on a AMD-
uname -agives
Code:
OS Solaris 10 x86_64 (SunOS goldtpus34 5.10 Generic_144489-11

I wanted to find whether it has a 32bit or 64 bit kernel so I did
Code:
/usr/bin/isainfo -k

It says
Code:
amd64

but when I do
Code:
file /sbin/init

It says
Code:
ELF 32-bit LSB executable 80386 Version 1, dynamically linked, stripped

The majority of binaries in a 64-bit installation of Solaris are 32-bit binaries. There is a historic reason for this related to the differences between SPARC chips and x86 chips. This is different than the approach taken with Linux. So even if the kernel is booted in 64-bit mode, you will see that init is a 32-bit binary. The isainfo command is specifically designed to show which kinds of programs the kernel can run.

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
# 5  
Old 11-20-2015
Quote:
Originally Posted by RavinderSingh13
There is a historic reason for this related to the differences between SPARC chips and x86 chips
I would be interested in seeing an authoritative reference for that statement.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Which version of Windows Vista to install with a product key? 32-bit or 64-bit?

Hello everyone. I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Discussion started by: milhan
4 Replies

2. Shell Programming and Scripting

How to handle 64 bit arithmetic operation at 32 bit compiled perl interpreter?H

Hi, Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result. perl interpreter info, perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies

3. UNIX for Advanced & Expert Users

migrating unix mp-ras 32 bit to linux suse 64 bit

Hi. I need to migrate the whole unix environment from a Unix mp-ras 32 bit to a Linux Suse 64 bit. 1) can i use cpio to copy the data? 2) can i just copy the users from unix to linux or do i have to create them by hand 3) are there any other concerns i should worry about? thanx (1 Reply)
Discussion started by: mrodrig
1 Replies

4. Red Hat

boot the 32 bit kernel on a 64 bit PPC Linux machine?

Hi all, I'm looking to cover a corner case for an upcoming test cycle. Is there a way to boot a RedHat Advanced Server 4 (update 3) installed on a Power PC machine to use a 32 bit kernel? This would be similar to what is done here -> https://www.unix.com/aix/26204-aix-platform.html I've done... (0 Replies)
Discussion started by: philrau
0 Replies

5. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies
Login or Register to Ask a Question