The capital of Egypt during the period of the Old Kingdom was Menefer, which the Greeks came to call Μέμφις (Memphis). In Arabic today, it’s called Manf (مَنْف).
It was located on the east side of the Nile, in the direction of the sunrise and, thus, of light and life. On the west bank of the Nile, in the direction of the sunset, lay its cemeteries, including the great necropolis complexes of Dahshur, Saqqara, and most famously, Giza.
Even after the fall of the Old Kingdom, Memphis was an important city because of its strategic location at the mouth of the Nile Delta, which made it a port and a center of trade and commerce while keeping it safely back from the sea. But it was also a sacred center, believed to be under the special protection of Ptah, the patron god of architects and craftsmen and, therefore, also regarded as the creator god. (There may be a connection here between the name Ptah and the Arabic verb fataha, which principally means “to open” but which can also mean “to create.”)
The great temple of Memphis was Hut-ka-Ptah (“Enclosure of the Ka of Ptah”), and that temple’s name, rendered in Greek as Aίγυπτoς (Aigyptos) by the ancient historian Manetho, suggests one possible origin of the modern English name Egypt.
Memphis eventually declined when the great coastal city of Alexandria was founded around 332 BC by Alexander the Great.
The location remained a good one, though. It was at the border between Lower Egypt and Middle Egypt. Boats on the river paid tolls there when they were ascending or descending the Nile. A fortress that came to be called “Babylon” stood there — slightly northward of ancient Memphis — from (probably) sometime in the sixth century BC, and, in their turn, the Romans built a new fortress there. It became the nucleus, eventually, of a substantial town during the Christian period.
When the Arabs conquered Egypt in AD 641, they established a military base near Babylon that became known as Fustat and that became the first Muslim capital of Egypt.
Eventually, though, when the Fatimid Dynasty took control of Egypt, they decided to establish a new capital city of their own, slightly to the north. And, thus, in AD 969, Cairo was born. It is, thus, a rather new city by the standards of the Near East. But the general area in which it is located is immensely old, by historical standards.
Cairo’s name in Arabic, al-Qahira (القاهرة), means “the Victorious” or “the Conqueror.” This may reflect the astrological fact that, at the time of the city’s formal and official founding, the planet Mars — which was sometimes known in medieval Arabic as al-Najm al-Qāhir (النجم القاهر) or “the Conquering Star” — was in the ascendant.
In classical or standard Arabic, Egypt is known as Miṣr, and, in the colloquial Egyptian dialect of Arabic, as Maṣr. Reflecting its size, its political and economic and cultural power, and its vast importance for the entire country, though, Cairo is itself often called Maṣr and even Maṣr umm id-dunya (“Cairo, Mother of the World”).