Red Hat ( RHAT), a favorite of Microsoft ( MSFT)-haters, earned its first-ever profit, the company announced Tuesday. Red Hat distributes a popular version of Linux, a free rival to Microsoft's Windows and Sun's ( SUNW) Solaris operating system.The Raleigh, N.C.-based company met analysts' expectations, with a third-quarter net profit of $300,000 calculated according to generally accepted accounting principles and break-even earnings. The company generated its second-consecutive quarter of positive cash flow from operations -- approximately $1 million dollars in Q3, an increase of $429,000, or 74%, over the positive cash flow from operations of $582,000 in Q2. Revenue was $24.3 million, up from $20.05 million a year earlier and above analysts' consensus forecast for sales of $23.43 million. Trip Chowdhry, an analyst with Midwest Research Securities, says Red Hat Linux is gaining market share through factory installation on servers (representing 85% of its revenues) from Dell, IBM, H-P and Fujitsu. It is also gaining ground by rewriting its Advanced Server software to run with software products from Oracle, Veritas, Computer Associates and others.