Colin O'Brien's side are using this week to prepare for the forthcoming UEFA U17 Championships Elite Qualifying Round that takes place next month and this performance will be helpful for the Irish confidence.
Ireland took the lead in the sixth minute when Adam Idah headed to the net after a Rowan Roache delivery from an early Irish corner.
Two minutes later Hungary keeper Balazs Asvanyi made a good save to deny Aaron Connolly after the Brighton striker beat two defenders before getting his shot away.
Irish keeper Brian Maher made a good save to keep his side in front in the 22nd minute before the Hungarians had an attempt deflected just over the Irish crossbar in the 27th minute from a free-kick attempt.
Roache sent in a dangerous free-kick in the 32nd minute that Nathan Collins just failed to connect with and three minutes later Aaron Bolger turned provider for Connolly, who had a shot blocked before Conor Coventry’s rebound was saved by the keeper.
Ireland extended their lead when St Patrick’s Athletic’s Luke Nolan found the net with a rebound after a brilliant pass from Collins found Connolly and the keeper could only parry the shot.
Nolan had another chance four minute later but the Hungarian keeper made a good save. Asvanyi also did well to keep out a header from Collins in the 55th minute.
Asvanyi denied Roache in the 58th minute after good work by Bolger and Connolly and Nolan failed to turn the loose ball home.
The Hungarian keeper made further saves to deny Brandon Kavanagh in the 71st minute and Connolly in the 78th minute but overall the Irish were full value for a solid victory. The Irish meet Romania on Saturday in the second game of the week.
"We felt we deserved to win the game but the two sides were evenly matched. We scored early from a good set-play. Hungary had a couple of chances to level before half-time and it could easily have been all-square at the break," said O'Brien.
"We functioned better as a team defensively in the second half and we got a good goal. Overall it was good test. The approach this week is that everybody will play. It's been warm conditions this week and there'll be changes on Saturday once we assess how the players responded to this game physically.
"Some of our first half play will have to be a lot better when we get to Elite Phase level. Saturday will be another good test against a technical Romania side and we will be interested to see how they take on board what we've worked on with the squad this week."
REPUBLIC OF IRELAND: Brian Maher, Lee O’Connor, Kameron Ledwidge, Nathan Collins, Aaron Bolger, Luke Nolan, Conor Coventry, Rowan Roache, Adam Idah, Aaron Connolly, Jordan Doherty. Subs: Gavin Kilkenny for Idah 59 mins, Richard O’Farrell for Coventry 59, Brandon Kavanagh for Roache 70.
Unused: Cian Lee, Marcus Rowley, Tom Murphy, Ronan Manning, Darryl Walsh, Tyreik Wright
Thursday, February 9
Republic of Ireland 2-0 Hungary, Oliva, Spain
Saturday, February 11
Republic of Ireland v Romania, Oliva, Spain (12.00pm Irish)