how to verify if the OS installed is a 32bit or 64 bit?

Posted on 2009-02-18
Last Modified: 2012-05-06
My server has rhel 5.2 installed.
i entered the command
# getconf LONG_BIT and got the output as 64, so i decided the OS is a 64 bit, but i wanted 32 bit OS, so I got a new 32 bit OS image and after installation, I entered getconf LONG_BIT and i got the output as 64.  
To make sure I  reinstalled the OS with both 64 bit image and 32 bit image again and i see the same output.
I am wondering if i am looking at the correct place to verify the type of OS installed.
Please let me know how to verify whether a OS is 32 or 64 bit.

Thanks in advacne
Question by:vmwarecv1
    LVL 12

    Accepted Solution

    uname -p

    will show x86_64 for 64bit OS and i686 for 32bit
    LVL 23

    Assisted Solution


    Author Comment

    for both the versions, uname -p gives the same output x86_64.
    I am getting doubt whether I have the correct image, the one which actually says 32-bit might be a 64-bit.
    I am guessing its nothing to do with the hardware for the tricky outputs shown above.
    LVL 2

    Assisted Solution

    I'm guessing here that you're installing your OS as a virtual machine on ESX?
    Because I had similar problem before and the root cause is when you first set guest operating system, you select 64-bit Linux.  Then, regardless what you install, 32-bit or 64-bit,  your system will say 64 bit.
    I hope that helps :)
    LVL 7

    Expert Comment

    ls /lib/modules

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now