Former Supreme Court Justice William O. Douglas was buried yesterday on a windswept knoll in Arlington National Cemetery. And with him, agreed his friends, colleagues and persons he had never met, went a generous slice of American history.

"His person inhabited the beautiful places; so did his mind and spirit," said former CBS commentator Eric Sevareid, remembering Douglas' lifelong crusade as an environmentalist. Sevareid was one of five persons who eulogized Douglas during his funeral service at the National Presbyterian Church.

Abe Fortas, once Douglas' student at the Yale Law School and later a colleague on the Supreme Court, remembered his friend of five decades as a man who "believed, deeply believed, in people, and he fiercely resented infringement on their rights and their dignity."

Yet Fortas also recalled the impish Douglas, the one who once induced the Yale law dean to board a train to Boston when he was supposed to be speaking in New York.

Douglas, who died Saturday at 81, made sure that the 1,200 or so people who filled the church remembered his wit. He left instructions that the Woodie Guthrie song "This Land is Your Land" be sung at the services and that an explanation of the choice be offered.

Douglas said in his funeral instructions that the song was "not a socialistic view but expressed the right to move from place to place. See my views on vagrancy."

The instructions then listed the legal citation from a 1970 Supreme Court opinion that Douglas wrote voiding a vagrancy law in Jacksonville, Fla., according to Senate Chaplain Edward L. R. Elson, who officiated at the service.

Douglas served 36 years on the court, longer than any other justice, and in the process gained a reputation as one of the court's fiercest defenders of personal liberty and one of its most vociferous dissenters.

Such was Douglas' stature that much of official Washington attended the service, a large part of which was specified by Douglas in his funeral instructions. President Carter was there with Vice President Walter Mondale and his wife Joan. All three were attending their second major funeral in eight days, having paid their final tribute to AFL-CIO chief George Meany last week.

Douglas' wife, Cathleen, watched the funeral service from a front pew opposite Carter. Occasionally dabbing her eyes, she warmly greeted well-wishers at the church and the gravesite. After the brief ceremony at Arlington, she was handed the American flag that had draped her husband's brown wooden casket.

The Supreme Court was there, of course, in the role of honorary pall bearers. So were Attorney General Benjamin R. Civiletti; Secretary of of State Cyrus Vance; White House counsel Lloyd N. Cutler; at least seven senators, including Sens. Edward M. Kennedy and George S. McGovern, and the widows of Chief Justice Earl Warren and Justices Hugo Black and Tom Clark.

But so were hundreds of other people whose lives had been touched by Douglas, either personally or through his opinions and writings.

Rick Rio, a 34-year-old Washington tax lawyer, said he had never met Douglas, yet considered him 'the only hero I ever had. He was a true Jeffersonian, exalting the individual over the state."

Gordon Ebersole, a retired Interior Department aide, recalled writing a letter years ago to a West Virginia newspaper praising one of Douglas' books, "Points of Rebellion," a defense of young people, and then receiving a warm note from Douglas.

Hallam Mendenhall, 79, remembered his days 60 years ago with Douglas at Whitman College in Walla Walla, Wash. "He was a great debater, captain of the debate team," Mendenhall said, also recalling that the impoverished Douglas "had to live so frugally," even riding a cattle car to make his way East.

Chief Justice Warren E. Burger, often an ideological foe of Douglas' on the court, described his one-time colleague as one who "was always ready to think the unthinkable. And if doing that was a threat to accepted wisdom, upsetting to some, he took a pixie-like delight in that."

Another eulogist, former Secretary of Defense Clark M. Clifford, said Douglas' "enemies were injustice, intolerance and inequality of freedom."

All nine Supreme Court justices walked the final steps alongside Douglas' casket as it was carried by a military honor guard to a knoll in the Arlington cemetery about 150 yards from the grave of President John F. Kennedy. There, the Rev. Elson prayed briefly, three rifle volleys punctuated the silence and a bugler played taps.

But perhaps more important to Douglas, who wrote more than 500 dissenting opinions while on the Supreme Court, he now is buried 20 feet from another towering justice, Oliver Wendell Holmes, also one of the most vocal dissenters in Supreme Court history.