Amplifications of flow past a backward-facing step with respect to optimal inflow and initial perturbations are investigated at Reynolds number 500. Two mechanisms of receptivity to inflow noise are identified: the bubble-induced inflectional point instability and the misalignment effect downstream of the secondary bubble. Further development of the misalignment results in decay of perturbations from $x=28$ onwards (the step is located at $x=0$), as has been observed in previous non-normality studies (Blackburn et al., J. Fluid Mech., vol. 603, 2008, pp. 271–304), and eventually limits the receptivity. The receptivity is found to be maximized at an inflow perturbation frequency of ${\it\omega}=0.50$ and a spanwise wavenumber of ${\it\beta}=0$, where the inflow noise takes full advantage of both mechanisms and is amplified over two orders of magnitude in terms of the velocity magnitude. In direct numerical simulations (DNS) of the flow perturbed by optimal or random inflow noise, vortex shedding, flapping of bubbles, three-dimensionality and turbulence are observed in succession as the magnitude of the inflow noise increases. Similar features of linear and nonlinear receptivity are observed at higher Reynolds numbers. The Strouhal number of the bubble flapping is 0.08, at which the receptivity to inflow noise reaches a maximum. This Strouhal number is close to reported values extracted from DNS or large eddy simulations (LES) at larger Reynolds numbers (Le et al., J. Fluid Mech., vol. 330, 1997, pp. 349–374; Kaiktsis et al., J. Fluid Mech., vol. 321, 1996, pp. 157–187; Métais, New Trends in Turbulence, 2001, Springer; Wee et al., Phys. Fluids, vol. 16, 2004, pp. 3361–3373). Methods to further clarify the mechanisms of receptivity and to suppress the noise amplifications by modifying the base flow using a linearly optimal body force are proposed. It is observed that the mechanisms of optimal noise amplification are fully revealed by the distribution of the base flow modification, which weakens the bubble instabilities and misalignment effects and subsequently reduces the receptivity significantly. Comparing the base flow modifications with respect to amplifications of inflow and initial perturbations, it is found that the maximum receptivity to initial perturbations is highly correlated with the receptivity to inflow noise at the optimal frequency ${\it\omega}=0.50$, and the correlation reduces as the inflow frequency deviates from this optimal value.