This is a step by step process showing you how to install Ubuntu on your Nexus device. Be careful though! There’s always the possibility of bricking your phone. PROCEED AT YOUR OWN RISK!!
Here’s the step by step process as outlined by the Ubuntu Wiki:
Good luck & enjoy!