The visitors were 60 for two with Azhar Ali on 26 at lunch.
The visitors had made a cautious start to their innings and were well-placed before the break, with just one wicket down.
However, Babar Azam (23) edged the last ball of the session from Josh Hazlewood (1-8) to Australian captain Steven Smith in slips.
Smith, who made some rare catching errors in the first Test, went low to his right and just managed to cling on, boosting Australian spirits.
Although the pair played and missed on occasions, Sami Aslam and Ali were able to negotaiate the seamers, and it was not until the introduction of spinner Nathan Lyon that the home side tasted success.
With his third ball, Lyon had Aslam caught at first slip by Smith.
Aslam had batted with great caution for nine runs from 41 balls, but was surprised by some extra bounce and the ball caught the glove.
Ali survived a confident LBW appeal from the bowing of Josh Hazlewood when he was on six, and was comprehensively beaten by the next ball.
Australia kept the same 11 that won the first Test of the three-match series in Brisbane by 39 runs, keeping faith in struggling rookie batsman Nic Maddinson.
Pakistan made one change, replacing seamer Rahat Ali with Sohail Khan.
Disclaimer: No Business Standard Journalist was involved in creation of this content
