A Shimano STX shifter changes gears on a bicycle using a shifter cable that runs through cable housing. The cable housing is used along the cable path as a guide where the shifter cable bends, between the shifter and the upper bike frame, and again between the lower bike frame and the rear derailleur. Brake cables use a similar system, but the two types of cable are designed differently and cannot be interchanged. Only use proper shifter cable and housing when installing new cable in a Shimano STX rear shifter.
Spin the pedals with the rear tire off the ground so you can shift gears. Change gears on the hand shifters so the chain moves across the front and rear derailleurs to the smallest chain rings.
Pull the cable housing off the rear derailleur to expose the shifter cable. Unscrew the cable anchor bolt holding the shifter cable with a 5mm hex screwdriver. The anchor bolt is located on a retaining clip at the end of the derailleur arm behind the sprocket hub. Remove the shifter cable from the retaining clip. Unsnap the cable housing from the cable stops on the upper bike frame just below the handlebars and on the lower bike frame near the pedals. Remove the rear cable housing from the shifter cable and set it aside.
Unscrew the Phillips screw from the cable access port on the hand shifter. The cable access port is located beneath the shifter lever. Pull out the entire length of shifter cable from the access port. Then pull off the cable housing from the opposite side of the hand shifter.
Measure the new sections of cable housing you will need by using the old housing to determine length. Cut the new housing to the same length as the old, so the front and rear sections of cable housing are identical to the old ones. Insert the tip of an awl into the ends of the new cable housing to make sure the opening is clear. This ensures that the shifter cable will move freely inside.
Attach a ferrule to the two new sections of cable housing that fit into the cable stops on the bike frame. A ferrule is a cap that contains a hole in the tip. The shifter cable runs through the hole in the ferrule and continues to travel along the bike frame after it exits the cable housing. Ferrules rest in cable stops on the upper and lower bike frame.
Push the new front cable housing onto the hand shifter. The end without a ferrule snaps onto the shifter. Insert the new shifter cable through the access port on the hand shifter and feed the cable through to the other side. Continue feeding the shifter cable through the front cable housing attached to the shifter until it exits through the hole in the ferrule. Continue pulling the shifter cable out of the ferrule until the end-cap on the cable seats inside the hand shifter. Screw the access port screw into the hand shifter with a Phillips screwdriver. Push the ferrule on the front section of cable housing into the cable stop on the upper bike frame.
Insert the shifter cable through the ferrule on the rear cable housing and feed it through to the other side. Push the ferrule back into the cable stop on the lower bike frame. Pull the shifter cable so it is tight and connect it to the retaining clip on the derailleur. Screw in the 5mm hex anchor bolt into the retaining clip to secure the shifter cable. Slide the rear section of cable housing over the retaining clip on the derailleur to complete the installation.
The cable housing may not need to be changed if it remains in good condition and is not frayed. If this is the case, skip Step 4 and continue with Step 6. The cable tension may need adjusted if shifting is not optimal after installing the new shifter cable.