Abstract An old question of Arhangel’skii asks if the Menger property of a Tychonoff space X is preserved by homeomorphisms of the space $C_p(X)$ of continuous real-valued functions on X endowed with the pointwise topology. We provide affirmative answer in the case of linear homeomorphisms. To this end, we develop a method of studying invariants of linear homeomorphisms of function spaces $C_p(X)$ by looking at the way X is positioned in its (Čech–Stone) compactification.