Required Pakets
I use Ubuntu 13.10 (saucy) the required software is available in the package manager. Install required packages with:
sudo apt-get install heimdall-flash android-tools-adb
Download Cyanogenmod and Addons
* http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.3.1-i9305.img
* http://download.cyanogenmod.org/get/jenkins/40515/cm-10.1.3-RC2-i9305.zip
* http://goo.im/gapps/gapps-jb-20130812-signed.zip
Please check on the Cyanogenmod Website for the latest versions.
Install Clockwork
* Poweroff
* Poweron and press Volume Down + Home + Power
* Connect via USB
sudo heimdall flash --RECOVERY recovery-clockwork-touch-6.0.3.1-i9305.img --no-reboot
* Reboot to Clockwork and press Volume UP + Home + Power
Install Cyanogenmod
sudo adb push cm-10.1.3-RC2-i9305.zip /sdcard/
* Create a Backup
* Select the option to wipe data/factory reset.
* Select install zip from sdcard.
* Select choose zip from sdcard.
Install Gapps
* Poweroff
* Poweron and press Volume Up + Home + Power
* Connect via USB
sudo adb push gapps-jb-20130812-signed.zip /sdcard/
* Select install zip from sdcard.
* Select choose gapps zip from sdcard.