The Senate voted 70 to 20 yesterday to relax 45 years of government regulation of the nation's trucking industry.

The measure would reduce regulatory barriers to entry into the trucking industry by new firms, give trucking firms increased flexibility to price their services without first seeking government approval, streamline regulatory procedures and lift many of the federal restrictions that now keep trucking officials from deciding on their own what goods to carry, what cities to serve and what routes to take.

The lopsided vote followed nearly six hours of debate on the controversial trucking issue, during which Senate sponsors of the measure fended off two major attempts to weaken the bill.

Like the airline deregulation bill enacted into law in October 1978 and a rail deregulation package passed by the Senate two weeks ago, the trucking bill is designed to introduce more competition into traditionally regulated sectors of the economy.

The Senate-passed measure does not go as far as legislation jointly proposed last year by President Carter and his opponent for renomination, Sen. Edward M. Kennedy (D-Mass.). But it would go far enough in changing Interstate Commerce Commission regulation of the trucking industry that it won praise yesterday from both Kennedy and administration aides.

"I think it's a magnificent effort," Transportation Secretary Neil Goldschmidt said. He said the administration was hopeful the House would act soon to get a bill on the president's desk by the June 1 target date set by administration and congressional leaders.

President Carter called the Senate measure "a landmark trucking regulatory reform bill" that would help in the fight against inflation.

Proponents of the measure, including sponsoring Sens. Howard W. Cannon (D-Nev.) and Bob Packwood (R-Ore.), argued yesterday that a more competitive trucking industry would result in lower shipping rates -- and therefore less inflationary pressure on consumer prices -- for food and other products hauled by trucks, a more fuel efficient industry and new opportunities for small businesses.

The bill would make it easier for new trucking companies to enter the business and for existing trucking companies to expand services. Trucking companies would also get increased freedom to raise or lower rates in a certain zone without ICC inerference.

One of the most controversial sections of the measure would reduce the antitrust immunity granted to the trucking industry that allows companies collectively to decide on the rates all will charge the public.

Although the bill would not eliminate these rate bureaus through which the trucking companies set rates, their legal ability to discuss and vote upon single-line rates would be eliminated in three years. Single-line shipments are those a company picks up and delivers on its own without transferring the goods to another company.

Another major provision of the bill would set up an expedited schedule for the elimination of operating restrictions that are thought to inhibit efficiency and fuel conservation efforts. These include restrictions on what commodities a trucking comapny can carry, what routes drivers must follow, what stops they can or cannot make and whether they have one-way or round-trip authority. The bill also would streamline ICC administrative procedures to cut down on delays.

In its debate yesterday, the Senate defeated 47 to 39 an amendment by Sen. Ernest F. Hollings (D-S.C.) that would have cut back on an expanded list of commodities that would be free of federal regulation. As it stands now, the bill would add all other food products to the raw agricultural products now exempt from ICC regulation, and thus hauled at lower rates.

Another amendment, sponsored by Sen. Warren G. Magnuson (D-Wash.) and defeated 56 to 34, would have shifted back to new applicants the burden of proving in lengthy proceedings that they should get a federal license to operate a trucking company. Instead, the Senate bill would allow a new entry unless opponents could prove that the new business would not be in the public interest.