In this work, we develop linear, first-and second-order accurate, and energy-stable numerical scheme for the Swift-Hohenberg (SH) equation. An auxiliary variable (Lagrange multiplier) is used to control the nonlinear term so that the linear temporal scheme can be easily constructed. To further achieve the accuracy with large time steps, a proper stabilized term is adopted. For the first-order time-accurate scheme, the backward Euler approximation is adopted. The Crank-Nicolson (CN) and explicit Adams-Bashforth (AB) approximations are applied to achieve temporally second-order accuracy. We analytically perform the estimations of the semi-discrete solvability, the energy stability with respect to the original and pseudo-energy functionals, and the convergence error. To numerically solve the resulting discrete system of equations, we use an efficient linear multigrid method. We present various two-(2D) and three-dimensional (3D) computational examples to demonstrate the accuracy and energy stability of the proposed scheme.