Is it possible to detect 32 bit vs 64 bit in a bash script? [duplicate] February 16, 2023 by Tarik MACHINE_TYPE=`uname -m` if [ ${MACHINE_TYPE} == 'x86_64' ]; then # 64-bit stuff here else # 32-bit stuff here fi