This paper studies the group consensus for multi-agent systems with linear dynamics and directed graphs. Through it-erative learning control algorithm, the followers can track their own leaders in a limited time interval. First, under the assumption that both subgroups satisfy the in-degree balance, this paper defines a reasonable general group consensus error for the first-order multi-agent systems with two subgroups. In addition, we define distributed initial state learning laws, and assume that all inter-active agents are globally reachable. Next, sufficient conditions for group consensus are given. Then, this conclusion is extended to first-order multi-agent systems with multiple subgroups, and sufficient conditions are obtained. Finally, the effectiveness of the theories are verified by two simulation examples.