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 Yhwh Yir'eh ("God will see to it", the name given by Abraham to the place where he began to sacrifice his son) and the town "Shalem".
This picture shows the temple as imagined in 1966 in the Holyland Model of Jerusalem
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 sits 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.
Stepped Stone Structure in Ophel/City of David, the oldest part of Jerusalem
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.
Given the city's central position in both Jewish nationalism (Zionism) and Palestinian nationalism, the selectivity required to summarize 7,000 years of inhabited history is often influenced by ideological bias or background (see Historiography and nationalism). The periods of Jewish sovereignty in the city's history are important to Israeli nationalists (Zionists), who claim the right to the city based on Jewish descent from the Israelite Kingdom of Judah, of which Jerusalem was the capital. The periods of Islamic, Christian and other non-Jewish periods of the city's history are important to Palestinian nationalists, who claim the right to the city based on modern Palestinians' descent from many different peoples who have lived in the region. As a result, both sides claim the history of the city has been politicized by the other in order to strengthen their relative claims to the city, and that this is borne out by the different focuses the different writers place on the various events and eras in the city's history.
(source)