The Fermilab Linac has been upgraded by the replacement of four 201.25 MHz drift tube linac tanks with seven 805 MHz side-coupled cavity modules. The reduction in physical aperture of the side-coupled modules has made control of the transverse beam position a more important consideration. An algorithm has been implemented to achieve a global least-squares minimization of beam position errors. Under typical operating conditions the RMS error in the horizontal plane is reduced by a factor of 8 (from 0.54 mm to 0.07 mm) and in the vertical plane by a factor of 4 (from 0.59 mm to 0.14 mm). © 1995.