Use Anwar's answer to find the architecture.
Now here is the explanation for your second part of the question.
Below is the uname
output: In my case I have installed a 32 bit version. Both i386 and i686 refer 32 bit version. uname
will return x86_64 in case if it is a 64 bit version.
$ uname -a
Linux devav2 3.2.0-30-generic-pae #48-Ubuntu SMP Fri Aug 24 17:14:09 UTC 2012 i686 i686 i386 GNU/Linux
- Linux(-s) - OS/Kernel name
- devav2(-n) - hostname
- 3.2.0-30-generic-pae (-r) - kernel release
- 48-Ubuntu SMP Fri Aug 24 17:14:09 UTC 2012 (-v) - Kernel version with time and SMP stands for symmetric multiprocessing, which means you have multiprocessor support
- i686(-m) - Machine hardware name
- i686(-p) - processor type
- i386(-i) - hardware platform
- GNU/LINUX(-o) - Operating System name
Below is grabbed from uname --help
page which might help you to understand more about it.
-a, --all print all information, in the following order,
except omit -p and -i if unknown:
-s, --kernel-name print the kernel name
-n, --nodename print the network node hostname
-r, --kernel-release print the kernel release
-v, --kernel-version print the kernel version
-m, --machine print the machine hardware name
-p, --processor print the processor type or "unknown"
-i, --hardware-platform print the hardware platform or "unknown"
-o, --operating-system print the operating system