In this work, the linear responses of turbulent mean flow to both harmonic and stochastic forcing are investigated for supersonic channel flow. Well-established universal relations are utilized to obtain efficiently the mean profiles with a large parameter space, with the bulk Mach number up to 5 and the friction Reynolds number up to $10^4$, so a systematic parameter study is feasible. The most amplified structure takes the form of streamwise velocity and temperature streaks forced optimally by the streamwise vortices. The outer peak of the pre-multiplied energy amplification corresponds to the large-scale motion, whose spanwise wavelength ($\lambda _z^+$) is very insensitive to compressibility effects. In contrast, the classic inner peak representing small-scale near-wall motions disappears for the stochastic response with increasing Mach number. Meanwhile, the small-scale motions become much less coherent. A decomposition of the forcing identifies different effects of the incompressible counterpart and the thermodynamic components. Wall-cooling effects, arising with high Mach number, increase the spacing of the most amplified near-wall streaks; the spacing becomes nearly invariant with Mach number if expressed in semi-local units. Meanwhile, the coherence of stochastic response with $\lambda _z^+>90$ is enhanced, but on the other hand, with $\lambda _z^+<90$ it is decreased. The geometrical self-similarity of the response in the mid-$\lambda _z$ range is still roughly satisfied, insensitive to Mach number. Finally, theoretical analyses of the perturbation equations are presented to help with understanding the scaling of energy amplification.