Shocks aren’t crazy expensive, but they’re not exactly cheap either. The general advice you’ll hear is that you should only change a pair of shocks if they need to be changed while leaving the perfectly functioning ones intact. For example, if your front shocks aren’t working as well, you only need to change those. But if only your left front shock is giving you trouble, you’ll still have to change the front pair.  It’s also important to remember that you stick to the same model and brand of shocks for both the front and the rear. This is why people usually just buy four new shocks because they want to upgrade to higher quality shocks instead of simply buying another pair of the original shocks that came installed with their Xterra.  Furthermore, if you’re trying to put your vehicle first and invest in it in order for it to last a long time -- you’ll greatly benefit from changing all four shocks. Changing all four shocks means that you’ve reset the lifespan of the shocks on all four, and they’ll now last together and come into problems together. It makes life easier than replacing the front shocks now and then having to replace just the rear shocks next year, and always having newer and older shocks working together.