The steps below outline how to install the latest stable version of Arduino on a fresh copy of Ubuntu 12.10.

First, update all of the existing packages

sudo apt-get update  

Next, install the arduino and arduino-core packages.

sudo apt-get install arduino arduino-core