The presidential airborne command post, a specially designed Boeing 747 jetliner the chief executive would use in event of nuclear attack, is being moved from Andrews Air Force Base to an inland base that is safer from a Soviet short-range, submarine-launched nuclear missiles.

Nuclear war planners have long worried that a Soviet submarine off the East Coast could launch missiles that would hit Washington targets with less than 8 to 10 minutes warning, which would not be time enough for a helicopter to pick up the president at the White House and fly him to Andrews.

To help the president escape such an attack and prevent what the planners call "the decapitation of the government," the Pentagon decided to put the command post aircraft "at two different bases in the interior of the United States for survivability reasons," according to Donald C. Latham, deputy undersecretary of defense for command, control, communications and intelligence.

Latham's testimony, given to a closed session of the House Appropriations defense subcommittee in May, was declassified and released last week. A Pentagon spokesman said yesterday that Latham would not comment on his testimony.

The location of the two bases is "highly classified," according to congressional sources. One source said a primary base will be selected, with the second serving as an alternative "in the event of bad weather."

How the president would reach the airborne command post was deleted from the released testimony.

Pentagon officials have been trying to get White House agreement for moving the airborne command post from Andrews "since the Nixon administration," one source said.

Presidents have refused in the past, this source said, for "political reasons." The presence of the plane at nearby Andrews "sends a signal," he said, that there is a means of getting the president to safety in a crisis.

Tests of the system during the Carter administration, however, showed that a surprise attack by submarine missiles would leave a slim possibility that the president could reach Andrews and board the aircraft.

The plan to move the plane is more relevant today, sources said, because of estimates that the Soviet Union may deploy additional missile-firing submarines off the American mainland in response to the introduction of U.S. nuclear Pershing II and cruise missiles into western Europe.

Transfer of the command plane was one one of several programs Latham outlined to maintain the continuity of government in a nuclear attack.

Two other communications efforts:

* A new communcations system that the Pentagon says it believes could survive an initial nuclear attack and give the president, or his successor, a means to launch a counterstrike by B52 bombers and perhaps missiles. The first test elements of this ground wave emergency network (GWEN) are to become operational in December, and the system eventually is to have more than 300 towers or nodes across the country. It is expected to cost almost $400 million.

* A new special high frequency radio network being rushed into Europe to link the new Pershing II and cruise missile sites with their command centers and the storage areas where nuclear warheads are kept.

The system, called the "Regency Net," also will be linked to the United States, according to one congressional source. It will "have the capability for maintaining connectivity to the custody and weapons control sites in peacetime," Latham told the subcommittee, "and then release and employment in wartime."

He added that its advantage over the current radio system, called the "Cemetery Net," was that is "far more reliable and jam-resistant."