Disconnect the negative terminal of the battery. This is necessary to prevent any electrical shocks.
Jack up the front end of the truck using jack stands.
Locate the speedometer cable. It is located on the back of the transmission.
Disconnect the speedometer cable from the transmission.
Use a wrench to remove the speedometer cable from the speedometer housing, it is behind the gauge cluster,
Install the new speedometer cable.
Connect the speedometer cable to the transmission.
Connect the negative terminal of the battery.
Test the speedometer to make sure it is working properly.