International Business Machines Corp. is in talks to buy Sun Microsystems Inc. in a combination that would bolster IBM's heft on the Internet, in data storage and in government and telecommunications areas, according to people familiar with the matter.

The two companies have a common interest in that both make computer systems for corporate customers that aren't reliant on Microsoft Corp.'s Windows software or Intel Corp.'s microprocessor technologies. The two companies are also strong supporters of open-source Linux and Java...