The commander-in-chief of the Pakistani armed forces is the President of Pakistan.
To understand that, let’s see what the Constitution of Pakistan has to say about this:
Article 243: Command of Armed Forces –
The Federal Government shall have control and command of the Armed Forces.
Without prejudice to the generality of the foregoing provision, the Supreme Command of the Armed Forces shall vest in the President.
The President shall subject to law, have power-to raise and maintain the Military, Naval and Air Forces of Pakistan; and the Reserves of such Forces; and
To grant Commissions in such Forces.
The President shall, on the advice of the Prime Minister, appoint:
The Chairman, Joint Chiefs of Staff Committee;
The Chief of the Army Staff;
The Chief of the Naval Staff; and
The Chief of the Air Staff, and shall also determine their salaries and allowances.