Logo

How to determine whether a given Linux is 32 bit or 64 bit?

To determine whether your Linux system is 32-bit or 64-bit, you can use any of the following commands:

  1. Check Kernel Architecture via uname

    uname -m
    • x86_64 indicates a 64-bit kernel on x86 architecture.
    • i686 or i386 typically means a 32-bit kernel on x86.
    • On ARM systems, 64-bit could appear as aarch64, whereas 32-bit might be armv7l, etc.
  2. Check Full System Details via uname -a

    uname -a

    This shows more information (like kernel version), and you can look for x86_64 (or another 64-bit indicator) to confirm.

  3. Using file /sbin/init

    file /sbin/init

    This examines the /sbin/init binary and reports whether it’s 32-bit or 64-bit. For example:

    • ELF 64-bit LSB executable => a 64-bit userland.
    • ELF 32-bit LSB executable => a 32-bit userland.
  4. Using lscpu

    lscpu
    • Look at the “Architecture” or “CPU op-mode(s)” lines:
      • CPU op-mode(s): 32-bit, 64-bit => 64-bit CPU that can run either mode.
      • CPU op-mode(s): 32-bit => purely 32-bit environment.
  5. Distribution-Specific Tools

    • Some distributions have graphical tools or system information commands (e.g. inxi -S) that indicate whether the installed OS is 32-bit or 64-bit.

Recommended Resource

If you want to sharpen your coding skills along with your system knowledge, consider this course from DesignGurus.io:

CONTRIBUTOR
TechGrind