A Hobart DJ who headbutted former Prime Minister Tony Abbott will spend at least two months behind bars.

Astro Labe, 38, pleaded guilty in January to causing harm to a Commonwealth public official over the headline-drawing attack in September 2017.

He was on Monday sentenced in Hobart Magistrates Court to a six-month jail term but will be eligible for release after two months.