The Google Nexus 4 started shipping this week, and early users have already figured out how to root the phone. This provides access to files and settings that would otherwise be unavailable, and lets you do some nifty things like backing up all your users apps and data, adjusting CPU speed (under some conditions), or making other changes.
It also opens the possibility of accidentally deleting important files and damaging your device, so you should always do your homework before rooting.
A good place to get started on that homework is at Addictive Tips, where you can find a detailed guide for rooting the Nexus 4.
One thing to keep in mind is that right now all the methods involve unlocking your bootloader. While it’s very easy to do this on any Nexus device, it will wipe all data from your phone.
So if you think you might want to root your phone at some point, or install a custom recovery, it’s probably a good idea to unlock the bootloader right away — before you’ve installed dozens of apps and customized your phone.
Anyway, right now there are a few ways to root your phone. You can either push an insecure boot image to your phone and use that to load SuperSU and Busybox, or use a version of ClockworkMod Recovery, which is a little more foolproof.
As of November 16th, 2012, there’s no way to permanently install ClockworkMod or another custom recovery. But you can load it temporarily just for the purposes of rooting your device, making a nandroid (full disk) backup), or flashing other updates.
Once your bootloader is unlocked and your phone is rooted, though, it should be pretty easy to install a custom recovery later, once developers have had time to customize one to work with the Nexus 4.