Methods to know if a GNU / Linux system is 32 or 64-bit

32 and 64 bit chip

In general, all users know if their system is from 32 or 64-bit, since when they downloaded the ISO of the distro they handle, they would download the version they needed. You already know that since AMD brought 64-bit to desktop computers with the appearance of the ISA AMD64 (and the adaptation of Intel EM64T) with the Athlon64 microprocessor, now operating systems have been released for users who still have chips. 32-bit and for those who have the most powerful and modern versions.

Some more novice users they may not know the type of system they are using because they were not the ones who installed the distribution they use or simply because they are working occasionally with a distribution or system that belongs to another user. Even in some cases you may be managing a team remotely and they are not even face to face with the machine. But there are easy ways to find out. The first method that comes to mind, if you have the ISO image file of your distro at hand, is to check if it has the inscription x86_64 (64-bit) or if you have any of these others that would indicate 32-bit like i386, i486, i586 and i686. The simplest thing would also be to execute the command:

uname -p

But it exists another specific command What is it:

arch

Even You can use other commands such as the following, both one and the other will give us clues:

echo $MACHTYPE

lscpu

lshw -class cpu

With all these commands and options you will be able to know if it is 64-bit or 32-bit in a simple way. They are not the only methods that exist, there are also other ways to find out by consulting certain system files and with other programs, etc. But hey, this is more than enough ...


Leave a Comment

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

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   someone said

    Hello, some of the commands that you have used to know the type of cpu, but not if linux installed is 32 or 64 bit.
    Since you can have a 64 bit cpu and have installed a 32 bit version of linux.
    Well, and other commands indicate neither one thing nor the other.
    Greetings.

  2.   Jose de Alonso said

    Thanks for the article. In case it serves to someone:

    Here is a post that I have saved with more methods to know if Linux is 32 or 64 bits:

    http://www.sysadmit.com/2016/02/linux-como-saber-si-es-32-o-64-bits.html

    1.    Jose Carucí said

      Greetings José, I am working on a bash script where I have to determine if the Linux kernel is 32 or 64 Bit for a validation, and I think that with the link, where they explain in detail the necessary commands, I can determine it. Very grateful to Isaac and you for your input.

  3.   Original and Free Malagueños said

    Uname -p tells me unknown and lshw I had to install it, the others perfect.
    Debian 9 64 bit.

  4.   genaro said

    As easy as double-clicking on a 64-bit deb file and if it says that it cannot be installed on 32-bit systems, we already know that we have an old processor like grandma, hee hee hee!