I've said it a few times on other posts, but I'll type it out again (cause I'm too lazy to look for them

)
-Download adb&fastboot
Download Minimal ADB and Fastboot Tool (all versions)
-Download TWRP
https://dl.twrp.me/shamu/
-move the twrp file to C:/adb (created by the adb/fastboot installation tool) and rename it twrp-recovery (or something else that's easy to remember, I will use twrp-recovery simply because that's what I use)
-open terminal or cmd
-cd C:/adb [enter]
-Now put your device in bootloader (while phone is off, hold down power button and volume down)
-fastboot devices [enter]
-Make sure something is returned
-fastboot oem unlock [enter] (heh, I'm wearing the shirt from AC right now

)
-go through so that the bootloader is unlocked
-fastboot reboot-bootloader [enter]
-fastboot flash recovery twrp-recovery [enter]
-fastboot reboot-bootloader [enter]
-volume down twice, power button to enter Recovery
Now your bootloader is unlocked, and you can flash custom ROMs, kernels, etc
To get root, you're gonna have to download SuperSU (the highest-rated root app). Warning: the only versions that work with 6.0.1 are "beta," though I use them and they work fine. Generally, a lot of things that are still in "beta" are still fine to use
-Download SuperSU on your phone
https://download.chainfire.eu/896/SuperSU/BETA-SuperSU-v2.66-20160103015024.zip
-Go back to Recovery (power off -> volume down + power on, then scroll down to Recovery and press the power button to enter)
-Go to install and it should go right to your Downloads folder. Click on the SuperSU and swipe to flash
-Wipe cache/Delvik
-Reboot System
You are now rooted with your bootloader unlocked
WARNING: There is a difference between an unlocked bootloader and root. Please make sure you know the difference. An unlocked bootloader means that you can install things like ROMs, kernels, and .apk files, all through recovery or bootloader. Root means that you give your apps elevated permissions. However, these permissions can be dangerous. Make sure you only give root permissions to apps and such that you trust. Not doing so can cause very bad stuff to happen. Make sure you know what you're doing.
