1 Chronicles 11:6

11:6 David said, “Whoever attacks the Jebusites first will become commanding general!” So Joab son of Zeruiah attacked first and became commander.

1 Chronicles 19:18

19:18 The Arameans fled before Israel. David killed 7,000 Aramean charioteers and 40,000 infantrymen; he also killed Shophach the commanding general.

1 Chronicles 27:34

27:34 Ahithophel was succeeded by Jehoiada son of Benaiah and by Abiathar.

Joab was the commanding general of the king’s army.