Under the agreement, IBM bought all the issued and outstanding common shares of Red Hat for US$190 per share in cash.
A statement from IBM said Red Hat's services would now be available in all 175 countries where IBM operates. Red Hat currently has business in 40 countries.
"Businesses are starting the next chapter of their digital reinventions, modernising infrastructure and moving mission-critical workloads across private clouds and multiple clouds from multiple vendors," said Ginni Rometty, IBM chairman, president and chief executive.
"As the leading hybrid cloud provider, we will help clients forge the technology foundations of their business for decades to come."
Jim Whitehurst, president and chief executive of Red Hat, said: "When we talk to customers, their challenges are clear: they need to move faster and differentiate through technology. They want to build more collaborative cultures, and they need solutions that give them the flexibility to build and deploy any app or workload, anywhere.
"We think open source has become the de facto standard in technology because it enables these solutions. Joining forces with IBM gives Red Hat the opportunity to bring more open source innovation to an even broader range of organisations and will enable us to scale to meet the need for hybrid cloud solutions that deliver true choice and agility."
Whitehurst will continue to lead Red Hat which will operate as a separate business unit within IBM, with its results to be be reported as part of IBM's Cloud and Cognitive Software segment.