This paper considers the online optimal consensus control problem for unknown linear discrete-time (DT) multi-agent systems (MASs). Based on time-based adaptive dynamic programming (ADP) method, the control policies are designed by utilizing the current and recorded data of unknown MASs. The critic-actor NN frameworks are employed to approximate the performance indexes and optimal control policies, respectively. The NN weights are updated once at the sampling instant to produce real-time online control. Furthermore, the control policies are proved to effectively drive the MASs to achieve consistency and satisfy the Nash equilibrium. Finally, a numerical example is implemented to shown the feasibility of the control scheme.