Israeli Defense Minister Ezer Weizman warned yesterday that the Israeli army would take unilateral action if Palestinian commandos failed to stop shelling northern Israel within 48 hours.

Weizman pointedly addressed his warning to the United Nations, Syria and the Palestinian commandos, whom he called terrorists.

Speaking to local authorities during a tour of northern Israeli settlements, Weizman asked for another 48 hours' patience in bringing about Palestinian compliance with Israel's unilaterally declared cease-fire.

If the U.N. peacekeeping troops could not stop the Palestinians from shooting from Beaufort Castle, a stronghold on a mountain top, Israeli state radio quoted him as saying, "then the Israeli army would have to take the problem into its own hands."

Referring to the Swedish U.N. troops who Sunday drew Palestinian fire while trying to take up positions at a key bridge over the Litani River near Beaufort, Weizman said, "I think they should try again." He said he hoped the United Nations would impose a cease-fire on the commandos.

He predicted that the French U.N. contingent would be able to control the situation in Tyre, the only territory south of the Litani left unoccupied by the Israeli invasion.

Whether Weizman's statement was a military threat or designed solely to calm Israeli public opinion was difficult to gauge especially in the light of Israel's concern at the recent surge in long-range Palestinian rocket and artillery fire.

The Palestinians have targeted northern Israel to signal their continued combativeness from north of the Litani.

A further complication was provided by the announcement by Maj. Saad Haddad, commander of the Israeli-supplied Christian militia in southern Lebanon of the establishment of a southern Lebanese army.

The decision tied in with Israeli demands that any units of the reconstituted Lebanese army sent south should include Christian soldiers earmarked for integration with Haddad's force, estimated at 1,700 men.

Critics have said the Israeli plan was designed to sabotage stationing in the south of units of the unified Lebanese army, which has been recruited from Christians and Moslems in an effort to ease the communal tensions that split its predecessor in early 1976.

In view of Haddad's total dependence on Israel-in the Christian border towns-everything from tanks to vegetables comes from Israel. Both his statement, made in Marjayoun, and Israeli military commanders' remarks in the same vein are viewed by observers here as trial balloons.

Specialists also noted Weizman's renewed appeal to the Syrians, whom Israel would like to curb the Palestinians.

Israeli military sources suggested Israel might tolerate a small Syrian presence in Nabatiyeh, about four miles north of the Litani River, if that was the price for stopping long-range Palestinian shelling of northern Israel.

Ever since the mainly Syrian 30,000 man Arab peacekeeping force entered Lebanon to stop the civil war in 1976, Israel has insisted it stay north of a line generally understood to run eastward from the Zahrani refinery on the Mediterranean just south of Sidon to Jezzine and the Syrian frontier.

Moving into Nabatiyeh would constitute a kind of halfway measure between staying on this line and moving all the way south to the Litani River.