Transmission line parameters are critical inputs to a variety of power system analysis algorithms. To ensure the precision of line parameters, this paper proposes a novel linear method to estimate transmission line parameters, including series resistance, series reactance, and shunt susceptance, for non-compensated and series-compensated lines. Voltage and current phasors obtained by phasor measurement units (PMUs) from both ends are utilized in the algorithm. Linear least squares method is applied when multiple sets of measurements are available for improved accuracy. Distributed parameter line model is employed in developing the algorithm. An optimal estimator is also proposed, which can detect and identify possible measurement errors, although this type of method is no longer linear. The estimated line parameters can be used to determine line temperature and conductor sag. Evaluations studies demonstrate the effectiveness of the proposed methods.