Installation of ADB and Fastboot
Open Terminal and apply following commands,
sudo su
apt-get install android-tools-adb android-tools-fastboot
Plugin mobile phone with PC and can apply various commands to manage your phone.
Fastboot commands
Check mobile phone recognised
fastboot devices
Reboot the device into fastboot
adb reboot bootloader
Flash recovery (e.g. twrp) onto your device
Place recovery image in home folder.
fastboot flash recovery recovery.img
fastboot reboot
References
https://wiki.cyanogenmod.org/w/Doc:_fastboot_intro
https://wiki.cyanogenmod.org/w/Doc:_adb_intro