The federal city was in shock yesterday as if the Tories, soon to storm the city as did the British in 1814, already were poised in the nearby hills.

If the Reagan landslide and the Republican sweep of the Senate had one sure meaning, it was a repudiation of Washington, the capital of politics and bureaucracy. Beyond the Beltway, the people said they want things to change here, maybe even shook up in a serious way. Lots of important Washingtonians were already shuddering.

Ralph Nader, who thrived in the latter days of sprawling federalism, called the election a revolution, a "power shift so significant" that Republican elections of Richard Nixon and Dwight Eisenhower paled in comparison.

Michael Pertschuk, the Federal Trade Commission chairman who for almost two decades was one of the town's most innovative consumer advocates and then became a right-wing symbol as the "ugly regulator," said he would hang on at the FTC but fall back into "a mostly defensive position, trying to keep the big boys honest." Pertschuk will be a commissioner -- but no longer chairman.

At the Democratic National Committee, a perspiring switchboard operator hostilely fended off gloating telephone calls from the conquering army. Citizens were phoning from all over America to tell the Democratic Party: You had it coming. Or other unsympathetic remarks.

The reception room was empty except for an out-of-town tabloid that proclaimed, "Reagan Romps," and the wall photos of Democratic presidents from Lyndon Johnson back through James Madison already seemed dusty, as if their era had been consigned overnight to the history. The operator tried to fend off a caller who insisted on speaking directly to the president.

"Call the Carter-Mondale headquarters," she said. A pause. "Well, call Georgia."

On Capitol Hill a despondent liberal Democrat staffer, looking unemployment in the face, moaned: "Now I know how it was to be a right-wing Republican all these years."

In the hallways of the State Department only half-sick jokes were making the rounds about the transition ahead. All hands, it was said, were "clearing out their personnel files before Bill Safire [the Conservative columnist] starts pawing through them."

At the White House, autumn leaves blew wistfully across an almost-empty lawn and the flag -- but not much else -- still flew at full staff.

To be sure, not all was gloom in a city that was built on a half-century of activist federalism -- and, as the new conquerers believe, the bungling of a burgeoning bureaucracy their leader wants to cut back to size.

Across the Potomac, at the Pentagon, a woman Marine officer was overjoyed: "After four years with Humpty-Dumpty, it's going to be fun with Bonzo."

An Army officer in the Pentagon was equally happy, but concerned that the "California technocrats" would be "so hardware oriented that whatever help we get is going to go to the Air Force and Navy, not us."

At the venerable Army & Navy Club, retired officers chatted in quiet bliss while James Angleton, the former CIA counterintelligence chief who resigned in the post-Watergate investigation of the spook community, sat in his overcoat making a series of phone calls and relishing the defeat of Sen. Frank Church (D-Idaho), who conducted the CIA probe.

Others in the strange mix that is Washington were rubbing their hands. Realtors, suffering after months of a housing depression, were mentally counting their commissions as both the Senate and the White House turn over, with a whole new set of political transients coming and going. Maitre 'd's at the best restaurants could look forward to an influx of new power-brokers who will need new tables. And Republicans, it is said, are better tippers.

Still others, who had spent lifetimes living with and off federalism, were asking themselves just how terminal the rejection of liberal activism was, and at the same time were dealing with personal terminations -- their jobs.

At the Labor Department, Nik Edes, deputy undersecretary for legislation and intergovernmental relations, was philsophical about the abrupt change in his life.

"You live by the vote, you die by the vote," Edes said of the estimated 2,500 federal employes whose jobs swing on a presidential election. Edes, like a lot of other political appointees in this strange political year, said he has had his resume out "for a period of time." But he has no plans on a replacement for his $50,000-a-year job.

Much of highly professional Washington has its life built on a double income. Leon Billings, a former Senate aide who followed Edmund Muskie to the State Department, says he hasn't even started looking. He earns $50,000 and his wife works. But he says -- as a lot of others were saying yesterday -- that his wife's salary "is not sufficient to support us."

Some political appointees are able to land on their feet no matter how harshly the winds blow. Joe Laitin, assistant secretary of the Treasury for public affairs, has been a political appointee for 17 years, riding through four presidents, two of each party.

"It must be doing something right," says Laitin, who has gained a government-wide reputation as a survivor. It's a reputation he resents, with its assumption that "I'm maneuvering" to stay aboard.

Few of the top political jobholders who live by the vote and die by the vote accepted the idea that Tuesday's landslide was a rejection of the social policies they have spent much of their adult lives developing.

"I don't think the vote represents a consensus social programs should be eliminated or cut back, but rather a desire for constraints on their growth," said John Palmer, an assistant secretary at the Department of Health and Human Services and a onetime welfare expert at the Brookings Institution.

But Palmer acknowledged that the vote meant the people want those programs slowed down. "The trend for a slowdown is already there, and this sharpens it more," he said.

And some seemed just confused in the disarray of this City on the Potomac on the day after an election that some thought may be heralding the most revolutionary political development since 1932.

"It's so overwhelming, I really can't sort it out," said Bill Spring, associate director of the domestic policy staff at the White House. Spring said he thought the primary issues were economic. "But obviously," he said, "to a certain extent it's a repudiation of our policies."

And many thought that, as happened to that other anti-Washington who came to Washington four years ago, the resolute bureaucracy -- those faceless mechanics who run the government and are protected from evil winds by Civil Service guarantees -- will engulf and overwhelm the new invaders, too.

"Reagan will have to come to the center to govern," said one, who prefers anonymity because he still hopes he can preserve his job in the new administration.

Brock Adams, now a Washington lawyer-lobbyist after earlier leaving President Carter's cabinet in despair, said flatly that the Reagan sweep was "a mandate for change" -- an obvious rebellion of the people tht had become apparent years ago but that Carter ignored. Adams thinks the Democrats are back to "ground zero."

Adams sees the election as less a rejection of decades of new social programs than the accumulation of economic duress that, perhaps, partly grew out of those programs.

"Democrats disengaged from their natural constituency, the working class," Adams said. "They allowed inflation to rage on, government spending to rage on, until the backbone of the Democratic Party, the average guy, the working stiff, found himself escalated into a rich man's tax bracket. People rebelled."

But they were rebelling against more. They were rebelling against the symbol of the federal city, too, the symbol of a city and a government out of control, against decades of federal programs that became so complex and, to many, so ridiculous, that the time finally had arrived to call a halt.

Traveling the country during this campaign year provided any observer with an abundance of poignant vignettes about grand federal ideas that went awry by the time they reached Peoria:

A little old lady, hands crippled with arthritis, at a druggist's counter in Kansas, struggling with the child-proof container mandated by Washington for her painkillers. She couldn't match arrow to arrow, couldn't use her knobby fingers to push and twist simultaneously. The druggist just mumbled about those "frigging feds."

A geologist in Montana laughing without too much humor, about the federal regulation that requires a stretcher at a one-man mine. It reminded him, he said, of the light-bulb Polish joke in reverse.

People everywhere spending the better part of a decade disengaging auto-emission devices, undoing seatbelt buzzers and light, wondering when they were going to get the auto safety airbags Washington has been arguing about for more than 10 years.

Workers taking deep breaths of clean air as they walked past closed steel mills toward the unemployment office.

The revolt may have been about inflation and unemployment and Jimmy Carter's perceived inadequacies or Ronald Reagan's supposed strength. But what was there, too, was a rejection of the federal city and a lot of what it has come to stand for.