President Carter, moving to curb demonstrations and violence that could further endanger American hostages in Tehran, yesterday ordered the Justice Department to deport Iranian students in the united states illegally.

White House press secretary Jody Powell said Attorney General Benjamin R. Civiletti had been instructed immediately to check the approximately 50,000 Iranian students to identify those "not in compliance with the terms of their entry visas and to take the necessary steps to commence deportation proceedings" against them.

Powell said only that activities of many Iranian students "are not in the best interests" of efforts to free the 60 to 65 Americans held in Tehran by militants demanding that deposed Shah Mohammad Reza Pahlavi be returned from the United States.

However, other U.S. officials said the move had been dictated by fears that mounting outrage here could lead to clashes between Americans and Iranian students during demonstrations for the shah's deportation.

These sources said Carter and other senior administration officials had been especially alarmed by the television coverage of the fights and name-calling Friday during demonstrations here and in such cities as Los Angeles and Houston.

Yesterday the senior Washington executives of the three national TV networks were summoned to the White House for a meeting with Powell. Although Powell refused to comment on what was said, he is understood to have asked the networks to tone down their coverage of the demonstration violence to avoid provoking possible retaliation against the hostages.

Justice Department officials estimate there are about 130,000 Iranian citizens in the United States. Among those with student status, a large number are believed to have expired visas or are not attending school.

Doris M. Meissner, a deputy associate attorney general, said last night that several steps are being taken. Initially, she said, all Iranian students will be required in the next few days to report their location and status to the Immigration and Naturalization service.

In areas with relatively few students, she said, the Iranians probably will be asked to go to the nearest immigration office. But, she added, where concentrations of Iranian students are large -- the Washington area, southern California and Texas -- immigration officials probably will carry out the status checks on campuses in cooperation with university officials.

Meissner stressed that, under U.S. law, students whose status is considered illegal cannot be deported summarily. If they are unwilling to leave, she said, they are entitled to hearings and appeals.

Although deportation proceedings can take considerable time, especially if appeals are involved, Meissner said the Justice Department will commit enough personnel and resources to carry out the president's order as quickly as possible.

She also noted the administration is aware that many Iranian students do not support the government controlled by the Ayatollah Ruhollah Khomeini and could be subjected to persecution or danger if they return home. Those fearful of going back to Iran will be allowed to ask for political asylum, she said.

Meissner conceded the administration's move reverses a policy of sev- [Text omitted from source] students.

When agitation against the shahs government intensified in Iran late last year, a rash of violent anti-shah demonstrations by students here prompted then-Attorney General Griffin B. Bell to order deportation proceedings against those found here illegally. As a result, about 4,400 Iranians are already involved in various stages of deportation proceedings.

However, the situation changed when the shah fled Iran in January and power passed to Khomeini. Under prodding from the State Department, which pointed out that many Iranians might be in danger if they went back, Justice shifted to a policy known as "extended voluntary deportation" -- allowing all Iranians in the United States illegally to put off departure until June 1, 1980.

That deadline is now being withdrawn for those found illegally to be claiming student status, Meissner said. At the White House, Powell added that valid Iranian students can remain here and demonstrate their views in a legal manner.

Other government officials said the action was intended to dampen domestic unrest and violence and should not be interpreted as a retaliation against Iran for holding Americans hostage. Before instituting the deportation drive, they said the administration had carefully considered whether it might be view in Iran as a U.S. reprisal.