Home  »  CodeProgrammingSnippetsTechnology   »   Code to Check if Machine is 32bit or 64bit Linux

Code to Check if Machine is 32bit or 64bit Linux

Posted: March 24, 2023 | by Michael Bright

Do this to check if your Linux machine is 32bit or 64bit linux.

Using uname:

$ uname -m

#Output if 32bit
i686

#Output if 64bit
x86_64

Using lscpu:

$ lscpu

#Output if 32bit
Architecture:        i686

#Output if 64bit
Architecture:        x86_64

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.