The 38-year-old former Manchester United and West Ham player joins the Blues after a spell with Notts County.
Carroll, who has won 42 international caps, will link up with former Northern Ireland team-mate and current Linfield boss David Healy.
"He's obviously a player I know very well and he will bring with him considerable experience," said Healy.
Carroll made his Northern Ireland debut against Thailand in 1997 and is expected to be in the squad for the Euro 2016 finals in France.
Linfield finished second in the league last season and were beaten in the Irish Cup final by Glenavon.
"His experience will be of enormous benefit to the goalkeepers and indeed our entire squad," added Healy.
"I'm looking forward to working with him once his international commitments are concluded in the coming weeks."

It also showed the depth of squad head coach Alan Stubbs has assembled as they chase honours in three competitions.
He made seven changes to the team that started last Tuesday's Scottish Cup replay win against city rivals Hearts.
Danny Carmichael scored between Boyle's brace, and Stubbs' men rarely looked like slipping up against a gutsy but impotent bottom side Alloa.
Media playback is not supported on this device
It was a brilliant bit of vision from on-loan Celtic midfielder Liam Henderson that created the opener with a sublime diagonal pass.
That sent Boyle clear and he rounded Scott Gallacher to mark his first start since mid-December with a goal.
Steven Hetherington ought to have levelled for the visitors barely a minute after the restart, but he could only divert a bouncing cross straight into Mark Oxley's arms.
James Keatings' lovely through-ball set up Carmichael for the second six minutes from half-time in his first start since August - his maiden goal for the Hibees.
Alloa did create a number of chances throughout the match but they lacked the quality to exploit those opportunities.
It was tough on them when Boyle completed the scoring in 76 minutes with a back post tap-in when the part-timers were caught on the counterattack.
Hibs now make up their game in hand over Rangers at home to Morton on Wednesday night while Alloa face a vital home match against second-bottom Livingston on Saturday.
Media playback is not supported on this device
Hibernian head coach Alan Stubbs: "To score so early on settled all the players down and I think from then onwards it was a matter of being professional. When our chances came we took them.
"It's great to see the changes that I made to the team get on the scoresheet."
Alloa Athletic manager Jack Ross: "I don't have any qualms over the result, but I thought our players gave a good account of themselves individually and as a team. If we'd taken one of our opportunities early in the second half, it would have gotten us back to within a goal and the game could have been different, but there is a lot to be pleased about."
Northern Ireland goalkeeper Roy Carroll has signed for Premiership club Linfield on a one-year deal.
[NEXT_CONCEPT]
Martin Boyle's double piloted Hibernian past Alloa Athletic to within five points of Championship leaders Rangers.