check ubuntu version 32 or 64 code example

Example 1: how to check machine is 32bit or 64bit linux

uname -m 

NOTE: It shows if your system is running 32-bit (i686 or i386) or 64-bit(x86_64).
Example 1:
prashad@ubuntu:~/Desktop$ uname -m
x86_64     <<<<<<<<<<<<<<this is 64-bit

Example 2:(you can check with 'lscpu' command also)
durga@ubuntu:~/Desktop$$ lscpu
Architecture:          i686	  <<<<<<<<<this is 32-bit
CPU op-mode(s):        32-bit

Example 2: how to check if ubuntu is 32 or 64 bit

# Type The following command in the terminal 
# and Read the Architecture and CPU op-mode(s)
lscpu