Turn off your Samsung Galaxy S5 and Hold down, Volume Down, Center Home, and Power buttons together for about 2-3 seconds then let go of all buttons when you see a warning screen hit Volume Up button to enter Download mode. like below
You should now see Download mode. This is the ODIN download mode where you can use ODIN to install custom recovery. Plug a micro-USB cable from your Galaxy S5 to your computer.
Run ODIN program you downloaded earlier in Step 1. (only for Windows or use VMWare on Linux/Mac).
Note: On windows vista/7/8 right click on odin.exe and run as administrator
Also, you may have to use a USB 3.0 cable supplied with your Galaxy S5, try plugging it in a USB 3.0 port first and if that doesn’t work plug it into a regular USB 2.0 port. One of them should work.
DO NOT TOUCH ANYTHING ELSE but choose “PDA” in ODIN program then find the .tar file from chainfire root package you downloaded first then hit Start button.
Your Note 3 should now reboot. When rebooted, copy the SuperSU zip file you downloaded in Step 1 to your Note 3 internal storage.
Hold down, Volume Up, Center Home, and Power buttons together for about 6-7 seconds then let go of all buttons.
You should now be in CWM recovery. Choose “Install zip”, then “Install from sdcard”, then choose the SuperSU zip file you downloaded earlier.
Reboot and your Galaxy S5 should be rooted. You can verify by downloading and running Root Checker app from Play Store.