Assuming you take care of your mountain bike and don't ride it excessively hard, a mountain bike should last around 10 years. Of course, this is just a general number and some parts on your bike will need to be replaced earlier or later than others. For example, brake pads typically only last between 6 months to 1 year while headsets can last upwards of 5 years. With that said, if you perform regular maintenance on your bike and replace parts as needed, your mountain bike should serve you well for many years to come!