The consensus problem of a multi-agent system with nonlinear second-order underactuated agents is addressed. The essence of the approach can be outlined as follows: the output is redesigned first so that the agents attain the minimum-phase property. The second step is to apply the exact feedback linearization to the agents. This transformation divides their dynamics into a linear observable part and a non-observable part. It is shown that consensus of the linearizable parts of the agents implies consensus of the entire multi-agent system. To achieve the consensus of the original system, the inverse transformation of the exact feedback linearization is applied. However, its application causes changes in the dynamics of the multi-agent system; a way to mitigate this effect is proposed. Two examples are presented to illustrate the efficiency of the proposed synchronization algorithm. These examples demonstrate that the synchronization error decreases faster when the proposed method is applied. This holds not only for the states constituting the linearizable dynamics but also for the hidden internal dynamics.