These is very easy method to unlock bootloader , rooting and install recovery mode with two different types of tool.
1. Unzip the downloaded file and run the batch file to launch cmd window.
2. Boot you Nexus 5 in Fastboot mode. You can do this by turning the device off and by holding the Volume up + Volume down keys followed by Power button.
3. Connect your phone to computer via USB.
4. All you need to do is to type the corresponding number for the task you want to perform. If you are using any of this tools just hit ” 1 ” and hit Enter key.
5. The tool will then ask for your confirmation. Type “Y” for yes.Note : Kwongger’s NEXUS 5 All-In-One Toolkit, type “1″ to select “Continue” option.
6. Follow the on-screen prompts and you will have a Nexus 5 with root access, unlocked bootloader and TWRP recovery mode installed on it.
That’s it. Enjoy !!!
Thanks to XDA