Step One: Download Everything
First, grab the latest Raring daily build files for the 2012 Nexus 7:
(found here: http://old-releases.ubuntu.com/releases/raring/)
Next, grab the tools required to install these build files to your device:
On your computer, press Ctrl+Alt+T to start a terminal.
Add the Ubuntu SDK Release PPA:
$ sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
Update your system to use the latest packages:
$ sudo apt-get update
$ sudo apt-get upgrade
Install the ubuntu-device-flash package:
$ sudo apt-get install ubuntu-device-flash
(found here: https://developer.ubuntu.com/en/phone/devices/installing-ubuntu-for-devices/)
Step Two: Unlock Your Device
The 2012 Nexus 7 ships with a locked bootloader meaning you must unlock it to flash different images to the device. Fortunately, this is a trivial process, and you only need to do it once.
(Warning: Unlocking the bootloader erases all data and resets the device to factory defaults. If you would rather not lose all of your precious cat pictures, back them up to your computer!)
Reboot your 2012 Nexus 7 into the Android boot loader. To do this, first power down the device in the normal fashion (hold down the power button, then select power off and wait a few seconds). From the off state, hold the volume down button and press the power button. Continue holding the volume down and power buttons until you see the boot loader UI.
Using a micro-USB cable (the one you use for charging should be fine), plug your device into any computer running Ubuntu. The device now displays the boot loader GUI, which looks like this:
Verify fastboot lists the device. In a terminal on Ubuntu, run:
$ sudo fastboot devices
Start the bootloader unlock process:
$ sudo fastboot oem unlock
Your device should now prompt you to unlock the bootloader. Follow the on-screen directions to continue. Your screen should now look like this:
Complete the process by rebooting:
$ sudo fastboot reboot-bootloader
When the device reboots back into the bootloader (fastboot mode), you should see "LOCK STATE - UNLOCKED" in small red print. At this point your device is now unlocked.
(from here: https://wiki.ubuntu.com/Nexus7/Installation)
Step Three: Install Everything
Gunzip the *.img.gz file downloaded in Step One to extract the .raw file inside.
Verify once more that your device is connected via micro-USB and that fastboot lists the device by running the following in terminal:
$ sudo fastboot devices
(If your device is not listed, ensure that the device is turned on and booted to the bootloader.)
Issue the following series of commands:
$sudo fastboot erase boot
$sudo fastboot erase userdata
$sudo fastboot flash boot /path/to/*.bootimg
$sudo fastboot flash userdata /path/to/unzipped/*.raw
$sudo fastboot reboot
Step Four: Use Your Device
If everything went right, you should now have Ubuntu Desktop running on your 2012 Nexus 7! The installer will likely be buggy, but very familiar. Beware, of course, that this version of Ubuntu is no longer supported by Canonical, and you may have some difficulty finding and using the latest applications on your device. Good luck, and have fun with your newish oldish Ubuntu tablet!