Roared on by a sold-out Alvalade Stadium, Fernandes seized the first chance he had in the ninth minute when Joao Felix found Diogo Dalot and he teed up Fernandes to tap into an empty net.
Portugal doubled their lead through Fernandes from the penalty spot in the 35th minute after a Bernardo Silva cross struck the hand of defender Bright Osayi-Samuel.
Fernandes calmly converted the spot kick to complete only his third brace for Portugal.
"The perfection didn't exist or at least it is very hard to accomplish, but we made a great game, dominating every level," Fernandes told Sport TV. "It was a win that give us great confidence ahead of our debut against Ghana.
"We are a team, it is not about individuals and we have a great group, young players that are up and coming and hungry. We are ready to the World Cup."
Coach Fernando Santos made six substitutions in the second half and Ramos scored Portugal's third immediately after Portugal goalkeeper Rui Patricio saved a penalty from Emmanuel Dennis after the VAR spotted Dalot's foul in the 81st minute.
Ramos took a short pass from Raphael Guerreiro in his stride and unleashed a powerful shot low into the middle of the goal.
Joao Mario closed out the victory with a strike into the bottom corner to the delight of around 45,000 fans in the stadium.