President Reagan said yesterday that the capture of the four Palestinians who had hijacked the Achille Lauro had sent "a message to terrorists everywhere" that "you can run but you can't hide."

A jubilant Reagan, his nose bandaged after a new skin cancer operation, appeared in the White House briefing room to salute those who had participated in the capture and declare that the United States stood ready to take similar action if the opportunity presented itself.

The arrest of the hijackers triggered bipartisan torrents of praise for the administration from Capitol Hill, where members of Congress the day before had taken turns criticizing the president for talking tough but doing little about terrorism.

"Three cheers for Ronald Reagan, and to hell with pirates everywhere," said Sen. Gordon J. Humphrey (R-N.H.).

Reagan, responding to questions from reporters about his administration's record in dealing with terrorism, said "our problem in the past has not been lack of will."

He said that when 241 U.S. servicemen were killed in the "terrible tragedy" of the Marine headquarters' bombing in Beirut on Oct. 23, 1983, "the perpetrators of the act went up with the bomb." In a number of other cases, he said, "to retaliate would simply be an act of violence without any knowledge that you were striking the perpetrators of the deed and you might be attacking many innocent people."

"This has been our great problem with terrorism," Reagan said. "But here was a clearcut case where we could lay our hands on the terrorists."

The president said he didn't think that the capture of the terrorists had increased the danger for other Americans in the Middle East, but State Department officials said that U.S. embassies and other installations in the region and in Europe had been urged to beef up security and to remain alert for possible reprisal attempts.

No travel advisories or special instructions have been issued for U.S. travelers or private businesses abroad. Officials said that since the U.S. government had no specific information about potential trouble, special instructions might cause unnecessary alarms.

The lingering concern among U.S. officials who were otherwise delighted with the turn of events was that relations with Egypt may have been severely strained over that country's role in allowing the hijackers to leave. Reagan tried to ease the damage, expressing gratitude to the Egyptian government for ending the crisis "without additional loss of life, although I disagreed with their disposition of the terrorists."

Reagan denied he was angry at Egyptian President Hosni Mubarak for his conduct, saying "we disagreed, but we have had too firm a relationship between our two countries and there's too much at stake with regard to peace in the Middle East for us to let a single incident . . . color that relationship."

Rep. Dick Cheney (R-Wyo.), a member of the House Republican leadership, said he thought that any strain with Egypt or other Arab countries would be temporary and cause "no lasting damage." He called the interception a "hell of a good effort, a deft touch, in keeping with American standards and values of bringing people to justice."

Before leaving for the Columbus Day weekend, the House approved without dissent a resolution praising Reagan for the capture.

Rep. Trent Lott (R-Miss.), House minority whip, contrasted the "anger" he said prevailed in the House on Thursday with yesterday's "upbeat mood." "There was growing frustration and disenchantment with the fact nothing had been done to take retribution," Lott said. "Something had to be done."

Rep. Lee Hamilton (D-Ind.), chairman of the House Foreign Affairs Mideast subcommittee, made a similar point, saying that the capture had defused anger that had been building for months. But he added, "I don't think if you capture a few hijackers, terrorism will abate or stop."

Generally, Democrats, including some of the president's most frequent critics, praised him as fully as Republicans.

Sen. Gary Hart (D-Colo.) issued a statement commending Reagan and calling the capture of the hijackers "a good example of an appropriate use of our military force" to deter and punish terrorists. House Majority Whip Thomas S. Foley (D-Wash.) praised Reagan for "acting decisively." Former president Jimmy Carter said, "I think we've done a fine job."

Even New York Gov. Mario Cuomo, a Democrat who rarely has anything good to say about Reagan, said of the president, "He's never had a finer hour."

Within the administration, where accomplishments in foreign affairs have been difficult to come by, the mood was both positive and self-congratulatory, despite the lingering problem of the U.S. relationship with Egypt.

Reagan and his national security adviser Robert C. McFarlane took turns lauding the U.S. servicemen, diplomats and intelligence agencies involved in the capture. The president also congratulated Italian Prime Minister Bettino Craxi for being "courageous in his insistence that those apprehended shall be subject to full due process of law."

The president also praised Tunisian President Habib Borguiba for his "forthright decision to refuse the entry of the fugitives."

After the briefing, Reagan telephoned his sympathies to the family of Leon Klinghoffer in New York. The White House said the president spoke with Klinghoffer's daughters, Lisa Sue Arbittier and Ilsa Peta Klinghoffer, "and told them that he and Mrs. Reagan had them in their prayers."

In his statement on the incident, Reagan said that "events of the past 24 hours reinforce the determination of all of those who share the privileges of freedom and liberty to join together in countering the scourge of international terrorism."

He declined to answer a question about whether the U.S. fighter planes would have shot down the jet carrying the fugitives if the pilot had refused to land in Sicily.

"That's for them to go to bed every night wondering," he said.