President Reagan today cautiously hailed the Lebanon cease-fire as the beginning of a process that would lead to a long-term negotiated settlement there.

"It is a first step, and you see my fingers crossed," Reagan said shortly after speaking by telephone with Lebanese President Amin Gemayel.

Later, Reagan told a reception of U.N. diplomats that "within a few hours, it is hoped that the guns will finally be stilled." But he added that Lebanon had been wracked by conflict and war so long that "the building of peace and national reconciliation will be a very formidable task."

At stake in Lebanon, Reagan said, is "a vital principle of international law and international morality, a principle at the heart of the U.N. Charter: a country's right to decide for itself how best to achieve its sovereignty free of occupation and blackmail."

Secretary of State George P. Shultz said there would be no immediate change in the role or deployment of U.S. Marines stationed in Lebanon as part of a multinational peace-keeping force. But Shultz, briefing reporters here, said the Marines should be "a little more comfortable in carrying their mission out" once the cease-fire takes effect.

The Marines, deployed about a year ago, have come under periodic heavy shelling since Israeli troops withdrew to a line in southern Lebanon. Four Marines have been killed since Aug. 29, and seven have been wounded since Friday.

Neither Shultz nor other U.S. officials would address the question of whether the cease-fire, if it holds, would permit withdrawal of the Marines and offshore naval forces supporting them.

Reagan and Shultz arrived in New York today to attend the 38th session of the U.N. General Assembly, which the president is to address Monday morning in a speech expected to focus on proposals for reducing nuclear arms.

The president met at lunch with U.N. Secretary-General Javier Perez de Cuellar and the two talked to Gemayel.

"We commended President Gemayel for what he has done," said Reagan, who also praised Syria and Saudi Arabia for cooperating in bringing about the cease-fire.

" . . . We must recognize that Saudi Arabia had a very definite hand in bringing about this first step," Reagan said.

Neither Reagan nor Shultz would make any predictions about how long the cease-fire will last or where it might lead.

In an effort to shore up the fragile truce, Reagan called upon all parties to exercise "restraint and reconciliation."

U.S. officials are mindful of the long history of unsuccessful truces and of volatile conditions in Lebanon. They are particularly concerned that fighting may break out again between Druze and Lebanese government forces.

Shultz said, however, that Druze leaders participated in negotiations leading to the cease-fire.

Asked what had been the key to the cease-fire, an on-and-off proposition for more than a week, Shultz replied: "The key must have been the sense that people in the community had that further bloodshed and fighting was not going to be productive and that the time for national reconciliation had really come."

In the last two weeks, the administration has stepped up pressure for a cease-fire as congressional and public concern mounted over increased involvement of the Marines in the spreading civil war in Lebanon.

Last week, administration officials and congressional leaders hammered out a compromise on the current applicability of the War Powers Resolution. The White House says it thinks the measure has a good chance of being approved if some prospect for a Lebanese settlement is apparent.

In the last few weeks, U.S. special envoy Robert C. McFarlane has been shuttling between various Middle East capitals in an effort to win a cease-fire as a first step to negotiation of a new power-sharing arrangement in Lebanon. The caution with which U.S. officials from the president down greeted today's cease-fire announcement reflected a recognition that such a long-term political accord may be extremely difficult to achieve. Without such an accord, or a clear prospect of it, U.S. officials recognize that the cease-fire may not last.

Reagan's luncheon with Perez de Cuellar was in part a symbolic display of continued U.S. backing for the United Nations. Last week, Reagan seemed to support remarks by Charles M. Lichenstein, U.S. deputy ambassador to the United Nations, that were critical of the world body.

At the reception for U.N. diplomats tonight, however, he reversed course, saying that the United States is "proud" to host the organization and that "your presence honors our nation." He went on to describe the United Nations as "an effective forum for not only discussing our problems but doing something about them."

The administration now is trying to overturn a Senate vote last Thursday that would reduce U.S. contributions to the world body by $480 million over four years.

Later in the day, Reagan met Cambodia's two top non-communist leaders, Prince Norodom Sihanouk and former prime minister Son Sann. Officials said Reagan voiced "his continuing support" for the efforts of non-communist forces fighting against Vietnamese troops and the Vietnamese government in Phnom Penh.

An aide to Son Sann said Reagan was not asked for material assistance. Son Sann has been seeking military aid, but the United States has offered only political and humanitarian assistance.

Reagan also met with Liberian President Samuel Doe. Shultz made a point of reminding reporters that Liberia recently recognized Israel and took "very strong stands" at the United Nations in condemning the Soviets for the downing of Korean Air Lines Flight 007.