A city called Rušalim in the execration texts of the Middle Kingdom of Egypt (c. 19th century BCE) is widely, but not universally, identified as Jerusalem. Jerusalem is called Urušalim in the Amarna letters of Abdi-Heba (1330s BCE).
The name "Jerusalem" is variously etymologized to mean "foundation (Sumerian yeru, 'settlement'/Semitic yry' 'to found, to lay a cornerstone') of the god Shalem"; the god Shalem was thus the original tutelary deity of the Bronze Age city.
The form Yerushalem or Yerushalayim (Jerusalem) first appears in the Bible, in the Book of Joshua. According to a Midrash, the name is a combination of "Yireh" ("The abiding place", the name given by Abraham to the place where he began to sacrifice his son) and "Shalem" ("Place of Peace", given by high priest Shem), then the two names were united by God.
The earliest extra-biblical Hebrew writing of the word Jerusalem is dated to the sixth or seventh century BCE and was discovered in Khirbet Beit Lei near Beit Guvrin in 1961. The inscription states: "I am Yahweh thy God, I will accept the cities of Judah and I will redeem Jerusalem", or as other scholars suggest: "Yahweh is the God of the whole earth. The mountains of Judah belong to him, to the God of Jerusalem".
Shalim or Shalem was the name of the god of dusk in the Canaanite religion, whose name is based on the same root S-L-M from which the Hebrew word for "peace" is derived (Salam or Shalom in modern Arabic and Hebrew).
The name thus offered itself to etymologizations such as "The City of Peace", "Abode of Peace", "dwelling of peace" ("founded in safety"), alternately "Vision of Peace" in some Christian authors. The ending -ayim indicates the dual, thus leading to the suggestion that the name Yerushalayim refers to the fact that the city initially sat on two hills. However, the pronunciation of the last syllable as -ayim appears to be a late development, which had not yet appeared at the time of the Septuagint.
An ancient settlement of Jerusalem, founded as early as the Bronze Age on the hill above the Gihon Spring, was according to the Bible named Jebus (e.g., Judges 19:10:יְב֔וּס הִ֖יא יְרוּשָׁלִָ֑ם: "Jebus, it [is] Jerusalem"). Called the "Fortress of Zion" (metsudat Zion), it was renamed by David as the City of David, and was known by this name in antiquity. Another name, "Zion", initially referred to a distinct part of the city, but later came to signify the city as a whole and to represent the biblical Land of Israel. In Greek and Latin the city's name was transliterated Hierosolyma (Greek: Ἱεροσόλυμα; in Greek hieròs, ἱερός, means holy), although the city was renamed Aelia Capitolina for part of the Roman period of its history.
The Aramaic Apocryphon of Genesis of the Dead Sea Scrolls (1QapGen 22:13) equates Jerusalem with the earlier "Salem" (שלם), said to be the kingdom of Melchizedek in Genesis 14:18. Other early Hebrew sources, early Christian renderings of the verse and targumim, however, put Salem in Northern Israel near Shechem (or Sichem), now Nablus, a city of some importance in early sacred Hebrew writing. Possibly the redactor of the Apocryphon of Genesis wanted to dissociate Melchizedek from the area of Shechem, which at the time was in possession of the Samaritans. However that may be, later Rabbinic sources also equate Salem with Jerusalem, mainly to link Melchizedek to later Temple traditions.
In Arabic, Jerusalem is most commonly known as القُدس, transliterated as al-Quds and meaning "The Holy" or "The Holy Sanctuary". Official Israeli government policy mandates that أُورُشَلِيمَ, transliterated as Ūršalīm, which is the cognate of the Hebrew and English names, be used as the Arabic language name for the city in conjunction with القُدس. أُورُشَلِيمَ-القُدس. Palestinian Arab families who hail from this city are often called "Qudsi" or "Maqdisi", while Palestinian Muslim Jerusalemites may use these terms as a demonym.