* TSX ends up 0.9% at 21,794.56

* Posts its highest close since April 2022

* Tech sector rallies 2.5%

* Linamar jumps 11.4% after reporting earnings

March 7 (Reuters) - Canada's main stock index climbed on Thursday to its highest level in nearly two years, helped by gains for technology and railroad shares, as investors cheered corporate earnings and the prospects of lower interest rates.

The Toronto Stock Exchange's S&P/TSX composite index ended up 200.60 points, or 0.9%, at 21,794.56, its highest closing level since April 2022.

Wall Street's main indexes also climbed as Federal Reserve Chair Jerome Powell said the U.S. central bank was "not far" from gaining the confidence it needs in falling inflation to begin cutting interest rates.

"Interest rates, even though they are not coming down yet, central bankers are telegraphing to expect a rate cut probably later this year," said Lorne Steinberg, president of Lorne Steinberg Wealth Management.

"That's bullish for the economy, so the rail stocks are doing well."

Canadian Pacific Kansas City Ltd shares rose 2.2% and Canadian National Rail Co was up 1.2%.

Those moves helped lift the industrials sector by 0.9%, while technology added 2.5%.

Descartes Systems Group Inc shares added 4.6% after the software company beat fourth-quarter revenue estimates and shares of Constellation Software Inc were up 4.5%.

Investors also cheered the results of auto-parts manufacturer Linamar Corp. Its shares ended 11.4% higher.

The materials sector, which includes precious and base metals miners and fertilizer companies, rose 1.2% as gold added to its record-setting rally.

Eight of the TSX's 10 main sectors ended higher, with only consumer staples and energy losing ground. Oil settled 0.25% lower at $78.93 a barrel. (Reporting by Purvi Agarwal in Bengaluru; Editing by Shilpi Majumdar and Jonathan Oatis)