ScotRail has launched a three-month wi-fi trial on its Edinburgh to Glasgow service.
Rail operator ScotRail's £250,000 pilot will give train customers free web access on the commuter route connecting Queen Street station and Waverley Station via Falkirk High.
If the trial is successful, ministers hope to see wi-fi introduced across the country's rail network.
"I am delighted to kick off this wi-fi trial with ScotRail, which will play a massive part in ensuring future connectivity throughout Scotland's transport network," said transport minister Keith Brown.
"A major challenge for transport operators is how to ensure we embrace new technologies to allow passengers to get on with their busy lives while travelling.
"Business organisations have been very clear that wi-fi access on commuter routes would boost competitiveness in Scotland and this pilot is the first step to delivering that.
"We are working towards bringing the internet to every corner of Scotland, including ensuring people can get online even when they're on the move, be that commuting to and from work or travelling socially.
Four of ScotRail's Class 170 trains have been kitted out for the trial, which will see one in 10 services on the Glasgow-Edinburgh Queen Street line served by wi-fi.
Liz Cameron, chief executive for Scottish Chambers of Commerce, welcomed the pilot for the business community.
"This pilot project is an essential first step towards delivering the kind of connectivity that business needs in Scotland and we look forward to its extension to other routes as soon as possible," she said.