In the theoretical treatment of linear differential-algebraic equations one must deal with inconsistent initial conditions, inconsistent inhomogeneities, and undetermined solution components. Often their occurrence is excluded by assumptions to allow a theory along the lines of differential equations. The present paper aims at a theory that generalizes the well-known least squares solution of linear algebraic equations to linear differential-algebraic equations and that fixes a unique solution even when the initial conditions or the inhomogeneities are inconsistent or when undetermined solution components are present. For that a higher index differential-algebraic equation satisfying some mild assumptions is replaced by a so-called strangeness-free differential-algebraic equation with the same solution set. The new equation is transformed into an operator equation and finally generalized inverses are developed for the underlying differential-algebraic operator.