How Do You Tell If You Have a 32 Bit Version of Linux or 64 Bit Version of Linux?

Problem scenario
You want to install Docker on Linux.  But you need a 64 bit version of Linux.  How do you determine if your operating system is 32 bit or 64 bit?

Run this script:

os=$(uname -m | grep -i x)
if [ -z "$os" ];
  echo "The OS is 32 bit.  It will not work for Docker."
  echo "The OS is 64 bit"

Leave a comment

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