[Nexus 6 Q&A, Help & Troubleshooting] ktmom:
Remember, you need to power off the phone then use the previously mentioned key combination and go straight back to recovery after flashing the TWRP image. Anything else and the stock ROM will overwrite recovery.

Here are the udev rules for an Ubuntu based PC.

/etc/udev/rules.d/99-android.rules
# Google Nexus 6 16 Gb
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1:4ee7", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev" TEST=="/var/run/ConsoleKit/database", \RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee1", MODE="0666", OWNER="" # MTP media (multimedia device) nexus 6
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0666", OWNER="" # MTP media with USB debug on(multimedia device) nexus 6
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee5", MODE="0666", OWNER="" # PTP media (camera) nexus 6
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee6", MODE="0666", OWNER="" # PTP media with USB debug on (camera) nexus 6
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0666", OWNER="" # Bootloader nexus 6
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", MODE="0666", OWNER="" # Recovery nexus 6

Then restart the service

sudo service udev restart

or just restart the computer.

If you want, you can double check the vendor id and product id using "lsusb".

The script method of flashing is fine. If you run into problems, these next steps outline a manual method of flashing each partition. You need to extract the images from the compressed stock file first.

It's easiest if the stock rom is in the same directory as where place you put the fastboot binary. But you can just use the entire path to the location of the stock images. It's also less error prone to rename the stock images to just bootloader.img, radio.img, recovery.img, boot.img and system.img.

reboot to the bootloader

./fastboot reboot-bootloader

First flash the bootloader:

./fastboot flash bootloader /[PATH TO IMG]/bootloader.img

Again reboot the bootloader by typing

./fastboot reboot-bootloader

2nd flash the radio:

./fastboot flash radio /[PATH TO IMG]/radio.img

Again reboot the bootloader by typing

./fastboot reboot-bootloader

3rd flash stock recovery:

./fastboot flash recovery /[PATH TO IMG]/recovery.img

enter

Again reboot the bootloader by typing

./fastboot reboot-bootloader

4th flash boot partition:

./fastboot flash boot /[PATH TO IMG]/boot.img

Again reboot the bootloader by typing

./fastboot reboot-bootloader

5th flash the system: ( the -w cause the partiton to be wiped before flashing the new system image)

./fastboot -w flash system /[PATH TO IMG]/system.img

In your case (but probably not for everyone who stumbles on this post!)

6th wipe the user data partition: ( ** this clears internal memory!! **)

./fastboot erase userdata

Then clear the cache:

./fastboot erase cache

Finally, restart to the OS to make sure everything is working correctly.

./fastboot reboot

Now you can go back to flashing TWRP recovery, using the latest release and make sure to power off the device then use the key combinations to restart straight back to recovery.

Personally, once you achieve this point, I strongly recomend doing a back up of the EFS partiton in TWRP. If that partition is corrupted in any future process, you'll need that backup and it's specific to your device.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers