This paper studies the leader-following problem of general linear multi-agent systems (MASs). A leader-following model is constructed, and then the sliding-mode control (SMC) technique is utilized to guarantee that followers can track the leader. In order to eliminate the chattering, the sliding-mode variable is designed as a dynamical one, that is, the sign function exist in the derivative of the variable. Moreover, the energy-cost constraint problem is considered as well. Finally, the multi-spacecraft tracking problem is taken as an example to demonstrate the effectiveness of the theoretical approach.