Linux 64 Operating System and CPU
If it comes to installing software to a so far unknown Linux machine, you have the choice between 32- and 64-bit Software. The following shell scripts show whether CPU and operating system are 64-bit capable.
CPU check
cat /proc/cpuinfo |grep flags |grep -q ' lm ' && \
echo "The CPU is 64-bit capable" || echo "The CPU is NOT 64-bit capable".
Check operating system
uname -m |grep -q'_64' && echo "64 Bit Operating System" || \
echo "NO 64 Bit Operating System."