5 Command Line Ways to Find Out Linux System is 32-bit or 64-bit

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Senthil Kumar

A Linux Consultant, living in India. He loves very much to write about Linux, Open Source, Computers and Internet. Apart from that, He'd like to review Internet tools and web services.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

10 Responses

  1. DostrenzasLinux says:

    Great post!

    You can also check using a environment variable:

    echo $HOSTTYPE

    Result:

    i386 -> 32 bits
    x86_64 -> 64 bits

  2. xinchuangfu says:

    You can also use:
    echo $HOSTTYPE

    • Ravi Saive says:

      @Xinchuangfu,

      Thanks for the tip, yes that command worked on my Ubuntu, here is the output.

      [email protected] ~ $ echo $HOSTTYPE
      x86_64
      
    • SK says:

      Thanks mate. I don’t know this command before. Much appreciated.

  3. Raghavendra Bhat says:

    Anyway your post is apt and of high value. Thanks for your posts, do keep them coming.

  4. Prasanna says:

    I know few of them.
    lscpu
    lshw -class cpu

  5. Aaron Kili K says:

    You can also use:

    uname -m

  6. Raghavendra Bhat says:

    These methods are fine but they cannot conclusively lead you to show whether your CPU can do 64 bit computing. You have to ascertain whether you have a processor that can do 64 bit before you want to do the actual installation of the GNU/Linux port. You need to do the correct installation of the OS port to match your CPU. For that the best tool would be to boot the server/system using a Live GNU/Linux distribution, drop down to the command line and do a ‘cat /proc/cpuinfo | grep flags’ at the root prompt. If you see the ‘lm’ flag then your CPU supports 64 bit computing. If so, you can proceed to install the x86_64/amd64 port of the GNU/Linux distribution.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *