THE PEOPLE who run the world's airlines and airports know very well how to thwart hijackings. It has been done in this country for 12 years, for the most part effectively and well within the tolerances of a free society. You X-ray all carry-on luggage. You walk all passengers through metal detectors. You credential and keep control of all airline and airport employees.

Hijackings still occur; there were five of U.S. commercial flights last year. One originated in Haiti, another in St. Croix. Those were the only two on which the hijackers turned out to have guns. The armed Haitian was an airport security guard; the one from St. Croix was a prisoner being brought to this country. There were 1,632 firearms detected at screening points in just the last half o last year, along with two "military explosive-incendiary devices." There were 720 persons arrested for carrying firearms.

There is no known acceptable way to prevent hijackings entirely. It may well be harder to prevent them in some other places than here. But is it that much harder? In some countries, at some airports, security is apparently weak because the authorities are indifferent.

That seems to be the case at the airport in Athens, the last stop of Trans World Airlines Flight 847 before it was hijacked by two men last Friday. Both men had guns. How the guns got on the plane is not known. The passengers had to go through two checkpoints in boarding the plane, one run by the airport, one by TWA. Experts say there is no way to move guns undetected through a checkpoint whose X-ray machine and metal detector are properly functioning and properly manned.

The Athens airport is notorious for lax security. In a formal representation to the Greek government in February, the United States listed 26 ways in which the airport fell short of international security standards. The president was right to say in his news conference this week that the Greeks bear responsibility. The Transportation Department is now deciding whether to do more than warn U.S. travelers not to use the Athens airport. It has the power to keep U.S. carriers from stopping there. The department is also reviewing its judgment as to other dangerous airports.

Meanwhile, in Congress there has been another rush to put armed marshals on airliners, as was done briefly in the early 1970s. A lot of experts wince at this. They do not oppose selective use of marshals on flights thought to be especially vulnerable. But they are leery of the idea of gunplay at 40,000 feet. They imagine unarmed hijackers' somehow threatening other passengers to make armed marshals turn over their guns. Their basic view is that the fewer guns in the air, the better.

A limited number of additional marshals (the government already has some) may help, but the answer does not lie with marshals. It does not lie with Congress, either. The main answer lies with the governments that run airports abroad. The first responsibility is theirs.