How to flash root file

Step 1: Unlock the bootloader; fastboot oem unlock This WILL wipe your device. Skip if already unlocked. Set up your device and put SuperSU.zip into it.
Step 2: Download the appropriate TWRP/CWM image for your device.
Step 3: Boot your phone into bootloader; adb reboot bootloaderwhile the device is on or hold the power button and the volume down button while the device is off.
Step 4: Make sure your device is detected by fastboot; fastboot devices
Step 5: Temporarily Boot into recovery; fastboot boot nameofrecovery.imgThis will only boot the recovery, not install it.
Step 6: Flash the .zip file using the recovery and reboot.
You will have stock recovery and root access.