Nissan Pick-ups and Pathfinder 1970-1988
Reach up under the instrument panel and disconnect the cable housing from the back of the speedometer. It is attached by a knurled knob which simply unscrews. On many later models, the speedometer cable is connected to the speedometer by means of a press-fit. When you remove the combination meter (cluster), they simply come unplugged.
Pull the cable from the cable housing. If the cable is broken, the other half of the cable will have to be removed from the transmission end. Unscrew the retaining knob and remove the cable from the transmission extension housing.
Lubricate the cable with graphite powder (sold as speedometer cable lubricant, curiously enough) and feed the cable into the housing. It is best to start at the speedometer end and feed the cable down towards the transmission. It is also usually necessary to unscrew the transmission connection and install the cable end to the gear, then reconnect the housing to the transmission. Slip the cable end into the speedometer, and reconnect the cable housing.