Visiting side ends Day 2 on 225 for 2 after Lyon takes seven as Bangladesh bowled out for 305.
An unbeaten century stand between David Warner and Peter Handscomb led Australia's strong reply against Bangladesh on day two of the second and final Test in Chittagong on Tuesday.
The visiting side was 225 for 2 at stumps in its first innings, trailing by 80 runs after Bangladesh had been bowled out for 305. Warner was batting on 88 with Handscomb on 69 at the Zahur Ahmed Chowdhury Stadium.
Steven Smith, the skipper, hit a gritty 58 off 94 balls before being bowled by Taijul Islam, the left-arm spinner, as Australia slipped to 98 for 2. Warner and Handscomb then put together 127 runs to thwart the Bangladesh bowling attack, which failed to take a wicket in the final session of play.
Handscomb, who recorded his fourth Test fifty in just his 10th game, took regular drinks breaks as he battled exhaustion and dehydration in the final half-hour. The swashbuckling Warner played a sedate innings, having hit just four boundaries during his 170-ball stay at the crease so far.
Warner rode his luck with two reprieves. He was dropped at short-leg on 52 and then a stumping was missed when he was on 73, with Taijul and Mehedi Hasan being the unlucky bowlers.
Matt Renshaw, Warner's opening partner, departed early, dismissed by Mustafizur Rahman, the fast bowler, for four before the lunch break. The left-hand batsman tried to tickle a sliding delivery down the leg side but Rahim took a stunning catch behind the stumps.
Warner was then involved in a 93-run second-wicket partnership with Smith as the pair steadied the innings. Smith, who registered his 21st Test half-century, was done in by an arm ball from Taijul that sneaked through the bat-pad gap to hit the middle stump.
Earlier, Nathan Lyon claimed seven wickets with his offspin to help bowl Bangladesh out for 305 in the first session. Lyon returned impressive figures of 7 for 94, including Rahim's prized scalp for 68.
The home side, who leads the series 1-0, added 52 runs to its overnight score of 253 for 6 before losing all its wickets in the first session of play.
Lyon struck with his second delivery of the day to get Rahim bowled by a tossed up delivery that spun and got the inside edge of the batsman's bat before whipping the bails off. Nasir Hossain, Rahim's overnight partner with whom he shared a 43-run seventh-wicket stand, made a 97-ball 45 before becoming the second victim of Ashton Agar, the left-arm spinner.
But it was the 105-run sixth-wicket partnership on the first day between Rahim and Sabbir Rahman, who made 66, that remained the highlight of the innings after the home side had been reduced to 117 for 5.