Defense Secretary Caspar W. Weinberger arrived here today to seek Egyptian support for a strengthened United Nations force that could ease an Israeli withdrawal from southern Lebanon, U.S. officials said.

Weinberger will spend two days in Egypt before traveling to Israel to continue consultation that was initiated last week in Washington by Israel's newly formed cabinet.

The defense secretary flew here from Tunisia, where he met with officials for two days in seeking to bolster that pro-western nation's confidence in standing up to neighboring Libya.

In addition to discussing U.S. military aid in Egypt, Weinberger is expected to do what he can to advance the Mideast peace process, including the withdrawal of Israeli troops from southern Lebanon.

"You want to look at the number of ways in which that northern border can be secured," said a senior defense official traveling aboard Weinberger's plane who could not be identified according to the ground rules of the interview. "One of them is an expansion of that United Nations group, and it would be important for Egypt to be supportive of that."

The senior official said he believes that an accord leading to an Israeli pullback is within reach.

"Israel wants to get out, Lebanon would like to have them out, Syria has always said they want to get out of Lebanon and Syria certainly wants the Israeli troops out," the official said. "So . . . , you ought to pretty soon be able to get an agreement."

Weinberger will report to Egyptian President Hosni Mubarak on the recent meetings between President Reagan and Israeli Prime Minister Shimon Peres. With Isreal requesting sharply increased U.S. economic aid for next year, U.S. officials expect Egypt to request similar treatment.

The senior official aboard Weinberger's plane said that Egypt has "substantial" need for equipment, training and other logistic support for the U.S. weapons systems the country has acquired in the past few years. Egypt will receive about $2 billion in aid in fiscal 1985.

Weinberger also promised continued military support to Tunisia during his meeting with President Habib Bourguiba and other officials in Tunis and Carthage. Tunisia has received increasing military aid, even as U.S. economic aid has dwindled, since it put down an apparent Libyan-inspired uprising in 1980.

Both Tunisia and the United States were jolted this summer when their ally, Morocco, which like Tunisia had been considered staunchly pro-western, announced an alliance with Libya, which the United States considers to be dangerous and supportive of terrorism.

The announcement came as a particularly nasty surprise to Washington. Weinberger had visited Morocco only last spring. The new alliance has not affected U.S. military aid to Morocco or access to Moroccan airstrips by U.S. rapid deployment forces, but it has increased U.S. appreciation for Tunisian friendship.

Weinberger said that, in addition to providing military aid, the United States must "develop our own capabilities so we can be of assistance if the need should ever arise." He said U.S. aid, including F5 jet fighters and Chaparral antiaircraft missiles, is aimed at "preserving regional peace and stability."

The secretary's visits coincided with a port call by the USS William V. Pratt, a destroyer that is conducting exercises with Tunisia's coastal navy.