The 29-year-old Briton, who is seeking to complete a hat-trick of wins and claim a record fifth victory at the Hungaroring to cut into Rosberg's 14-points lead, clocked a best lap in one minute and 24.482 seconds.
This lifted him 0.238 seconds clear of the German, who seemed at a loss at times as to how he could claw back any of Hamilton's apparent advantage on one of his favourite circuits.
"That was good, but there is no grip out there and I don't know if it is the tyres or the circuit," said Hamilton.
"There were one or two things, but nothing major and it was fun. It is like it is for every Friday session."
Also Read
Asked to react to reports that Vettel has been linked with a move to Mercedes to replace him when his contract runs out next year, Hamilton said: "I don't react... Good luck to him!"
Asked about Vettel, the 29-year-old German said: "Which year are we talking about? 2016? 2018? I know it's the 'silly season' but this is more than silly!"
Hamilton had taken the initiative from the start of the day, topping the times in Friday morning's opening free practice with a best lap of 1:25.814 in clear, dry and hot conditions at the Hungaroring, a tight, slow and technical track set in a rural bowl of farmland 25km north of the Hungarian capital.
He was third in the morning and sixth in the afternoon as he and Alonso sought to end what threatens to be Ferrari's worst start to a season since 1986. Ferrari have secured only one podium this year.
Raikkonen has finished on the podium in his last five races at the Hungaroring and, like Hamilton, has an affinity with the characteristics of the circuit.
Jenson Button was ninth in the second McLaren and Felipe Massa 10th in the second Williams, having survived a lurid spin during the session.