Dale Byrne, 42, on Thursday pleaded guilty in Dandenong Magistrates Court to a single charge of using a carriage service to menace a commonwealth official.
A second offence of threatening to cause serious harm was withdrawn after he accepted a sentence indication and entered a plea.
Byrne admitted he made two posts to social media site X, formerly known as Twitter, directed to Prime Minister Anthony Albanese.
In both posts from February 7, he tagged Mr Albanese's X handle, called him a "c***" and said he "needed a bullet".
The posts were referred to the Australian Federal Police and officers arrested Byrne on March 18, when he conceded he was the author.
He accepted the messages could have been taken as a threat but said he did not agree with some of Mr Albanese's decisions.
"I don't think he's running the country real f***ing good," Byrne said in his police interview.
His lawyer Dimitri Osianlis on Thursday told the court the posts were juvenile and made in poor taste, but they did not amount to criminal behaviour.
"They're not intended by my client to be taken seriously," the lawyer argued.
Byrne was struggling with alcohol use at the time because he was dealing with a separate lawsuit connected to his work, Mr Osianlis said.
The lawyer accepted Byrne had faced court in 2022 for similar offending but argued a fine was still in range, despite prosecutors pushing for a community corrections order.
Magistrate Jacinta Studham agreed a corrections order was not appropriate, as it would prevent Byrne from carrying out his work as an interstate truck driver.
"It's in the community's interests for you to be gainfully employed - you're engaged, busy and distracted rather than sitting at home," she said.
Ms Studham said the posts were offensive and menacing, not only towards the prime minister but also the broader public.
She said the court needed to send a message that there were consequences for such social media posts.
"You're entitled to your political views," Ms Studham said.
"What you're not entitled to do is make threats or use the language you did."
She convicted and fined Byrne $2500.