Command Line

Is My System Capable of 32 or 64 Bit Linux?

There are a number of situations where you may not be sure if your CPU supports 32 or 64 bit Linux. If you want to know, it’s pretty easy to see if it supports 32 or 64 bit. If nothing else, it’s always good to know what your CPU architecture is and thus know which distros are compatible with your hardware.

You simply might not know this information. You wouldn’t be alone in that. These sort of questions pop up fairly regularly at the various support sites.

Maybe you were still new to Linux when you installed? Or maybe you’re working on a system that you yourself didn’t install? Perhaps you just don’t remember? There are a number of reasons why you’d want to know and why you might not already know.

Anyhow, this should be a relatively short article. There’s only so much fluff that I can add! I’m gonna tell you how to know for sure what architecture you can use.

Is my CPU 32 or 64 bit?

It was not that long ago that I saw someone asking this question at a forum I frequent. They wanted to know if their CPU supported 64 bit. The answer, which was well intended, was that they should run this command:

uname -a

Which would indeed output this sort of text:

x86_64 x86_64 x86_64 GNU/Linux

That’s great, but it’s not actually informative – as an answer to this specific question. What that command and output determine is that you’re using a specific variation of Linux. Granted, it’s true for those CPUs that support 62 bit and have a 62 bit CPU installed. It’s not always certain to be true, however.

For example, if you were using a 32 bit distro then the output from the ‘uname’ command would be 32 bit. You can run 32 bit Linux versions on 64 bit CPUs and the output will only be accurate so far as the version installed. After all, a 32 bit distro will run just fine on 64 bit hardware. Even if your hardware supports 64 bit, the uname command will output something about i686 if you have a 32 bit distro installed.

So, you could realistically have an output that says something about 32 bit while being perfectly capable of running 64 bit Linux versions. Using the uname command doesn’t tell you the hardware capability (necessarily). It tells you what is currently in use.

How do we know for sure? Well, there are a number of ways, but the easiest way that I can think of and it requires the terminal. Go ahead and open your terminal emulator by pressing CTRL + ALT + T on your keyboard.

Next, enter this ‘lshw‘ command:

sudo lshw -class processor

In the output you will find something about ‘width’ and that’s your answer.

width: 64 bits

If you want, you can use ‘grep‘ to process the output and get an even easier, or at least more concise answer. Just use this command:

sudo lshw -class processor | grep width

With any luck, that won’t lie to you. That won’t tell you what you’re using, that will tell you what CPU architecture you can use. If your CPU architecture supports it, it will tell you right then and there.

I’ve prepared a graphical demonstration of when it may present inaccurate information. The CPU is capable of 64 bit, but the OS in question is actually just a 32 bit OS.

See? The 32 bit OS is in use and it could use 64 bit.

There’s no doubt with the ‘lshw’ command, you learn if you can use 32 or 64 bit versions of Linux. That’s why it’s important to use that command rather than relying out the output of ‘uname’, as the ‘uname’ output only only tells you what CPU architecture you are currently using and not what CPU architecture you could be using.

And, there you have it. Thanks for reading! Don’t forget that you can sign up for the newsletter, donate, or simply opt to contribute to the site with articles of your own. If you want to lend a hand, let me know. I’m receptive to such things, as I am receptive to feedback!

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

View Comments

  • have you taken into account the motherboard, on some older equipment the processor may be 64 bit but the MB was only built for 32 bit, I myself had a tower with an asroc 32 bit board and an athalon x64 single core cpu.

    • The answer *should* be definitive about what the CPU supports in its current configuration. So, yes. Yes, it *should* be correct.

Recent Posts

A Quick Look At The Shutdown Command

This is going to be just a quick article about a command many of you…

14 hours ago

Setting Up Coding Environments on Linux for Educational Use

With so many strong attributes, such as robustness and flexibility, Linux stands as a powerful…

3 days ago

View Detailed Hardware Information

There are many tools for showing your hardware information and today we'll get to view…

5 days ago

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

6 days ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

1 week ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

2 weeks ago