The U.S. military made detailed preparations recently to launch a retaliatory bombing strike in Lebanon in the most advanced example to date of a new get-tough policy toward terrorism, Pentagon sources said yesterday.

The aircraft carrier USS Eisenhower was ordered shortly before Thanksgiving to hold her position in the central Mediterranean so she could launch a retaliatory strike if intelligence warnings about new terrorist attacks on the U.S. and British embassies in Beirut proved out, defense officials said.

"It was a case of if they did X, we would be ready to do Y," one official explained without disclosing the retaliatory target. Navy preparations extended to flying extra A6E bombers to the carrier, defense officials said, and briefing crews on what to strike.

The terrorists' attacks did not take place as feared and the retaliatory bombing plan was shelved. But the fact that the military was ordered to go so far as to prepare a retaliatory strike is the strongest indication to date that the administration is seriously considering going beyond rhetoric and employing military power to combat terrorism with Israeli-like tactics.

"Terrorism is an unbridled form of warfare," Secretary of State George P. Shultz said in his Oct. 25 policy speech making the administration case for tougher anti-terrorist efforts. "We need a strategy to cope with terrorism in all of its varied manifestations . . . . We must reach a consensus in this country that our responses should go beyond passive defense to consider means of active prevention, preemption and retaliation." The secretary, in a passage that caught the eye of military leaders, said experience has taught that "one of the best deterrents to terrorism is the certainty that swift and sure measures will be taken against those who engage in it."

Military leaders are taking the administration's rhetoric seriously and stepping up their anti-terrorism preparations all down the line. At the same time, they are warning, at least within their own circle, that preemptive and retaliatory attacks against terrorists, no matter how surgical, are likely to bring bloody reprisals against Americans abroad and at home.

The Joint Chiefs of Staff have established the Joint Special Operations Agency, headed by Marine Maj. Gen. Wesley Rice, to coordinate the anti-terrorist training and other related activities of the individual armed services. The chiefs of the services are going beyond that, however.

This past weekend, for example, Marine Commandant P.X. Kelley issued an order to every Marine command to analyze the terrorist threats in its area, develop tactics to combat them and train the troops and marshal the equipment so contingency plans can be executed swiftly.

The big chink in the anti-terrorist armor is the intelligence gap. Military leaders said the U.S. intelligence community seldom has detailed, reliable knowledge of who the terrorists are at a given moment, where they are located, what they are doing and what they are planning.

In the absence of such hard information, military leaders said, intelligence officials pass on to commanders in the field the questionable information they receive about imminent terrorist attacks. The commanders, in turn, unequipped to evaluate the warnings on their own, tend to order alert after alert rather than take a gamble, often exhausting their troops, according to military leaders with fresh field experience in dealing with terrorist threats.

President Reagan in his Oct. 21 television debate with Democratic presidential candidate Walter F. Mondale said "in dealing with terrorists, yes, we want to retaliate but only if we can put our finger on the people responsible and not endanger the lives of innocent civilians there in the various communities and in the city of Beirut where these terrorists are operating."

The president's demand for a surgical strike that would not kill civilians rules out such Israeli counterterrorist acts as attacking Palestinian camps and puts the burden on U.S. military commanders and their intelligence officers to pinpoint those relatively few places where only terrorists would be killed in a bombing strike.

Even if and when such "clean" targets are found, administration officials want them hit right before or just after a related terrorist attack on the United States, requiring such taxing military preparations as keeping bombers loaded with bombs and ready to take off quickly from carriers at sea or airfields on shore.

If all the requirements are met and preemptive or retaliatory raids are conducted by the United States against terrorists in a surgical way, one military leader warned, the terrorists are unlikely to respond in the same precise way.

"We might not like what we got back," he said.

Terrorists in Israel, for example, have bombed buses, thrown grenades into restaurants and blown up buildings.

Shultz indicated that, despite such dangers, the United States must stand ready to employ all its power, including military, to fight terrorism.

He said "terrorism is a contagious disease that will inevitably spread if it goes untreated."

The Marine Corps suffered the heaviest terrorist blow of any of the armed services on Oct. 23, 1983, when a lone terrorist detonated a pickup truck full of explosives within their compound at the Beirut International Airport, killing 241 servicemen, mostly Marines. Asked in an interview yesterday what the Corps has done in response to that attack, Kelley said:

"For the past year, we have had people literally going around the world and putting together a program for us -- tapping all the best minds in the world in how you counter this threat -- the British experience, the Israeli experience."

This research, together with the Marines' experience, will be distilled into anti-terrorist instructions for field commanders and their troops.

"We already are teaching recruits the fundamentals of terrorism. Then we build on that within the units," Kelley said.

Besides such specialized training, Kelley said the Marine Corps for the first time will request money in the new budget to conduct research into anti-terrorist equipment.

One laboratory, for example, has come up with a novel way to stop trucks: a string of chain and pipes. "There's no truck in the world that could go through it," Kelley said.

"What we're trying to do is address terrorism as another form of warfare," he said in summing up the Corps' expanding efforts.