An inspector for Irish Rail was told to "f**k off" after he asked to see a young man's ticket, a court heard.
Mark Blake (21) also pushed into the ticket inspector after he was asked to step off a train at Malahide Train Station.
When he was told that gardai had been called, he replied "f**k the gardai, I won't be waiting for gardai".
Judge Dermot Dempsey imposed a two-month sentence but suspended it for two years.
The defendant, of Briarfield Grove in Kilbarrack, admitted to verbally abusing an Irish Rail inspector on March 10 last year.
The incident took place at Malahide Station on a train destined for Drogheda.
Garda Margaret Kelly told Swords District Court an Irish Rail revenue inspector came into Malahide Garda Station to report a man who was verbally abusive to him when he asked for his train ticket.
Gda Kelly said Blake told the inspector to "f**k off" and pushed into him.
The court heard Blake has 19 previous convictions, including four for breach of the peace.
Defence lawyer Annette Kealy said Blake suffers ADHD, panic attacks and depression.
Ms Kealy said Blake knows his behaviour was unacceptable, but he was "lost" for a while.
Suspending a two-month sentence for two years, Judge Dempsey said Blake's "sob story" won't work with him again.