The consensus of multi-agent systems (MASs) by way of prescribed-time sliding mode control (PTSMC) is investigated in this paper. For the nonlinear system, a continuous and monotone controller is devised to attain the prescribed-time stable (PTS). A prescribed-time sliding mode surface (PTSMS) is selected for the second-order system, and a prescribed-time controller is designed to ensure that all states arrive at the PTSMS within the prescribed time. Then, the PTSMC method is applied to the distributed consensus of the second-order MASs. The efficiency of the presented methods is validated by the simulations.