Distinguishing 64bit/32bit environment by a shell prompt by ShujiNarazaki
You can build 32bit Linux in 64bit Linux.
If you did so, you might wonder which you are on. This video shows a way to set a nifty bash-prompt that shows 32 or 64.
ldd /bin/bash | grep -q '/lib64/ld-linux'
if [ $? == "1" ] ; then
export PS1 = "\h(32):\w$ ";
else
export PS1 = "\h(64):\w$ ";
fi