All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Imam Muslim reported in his book on the authority of Abu Hurayrah that the Prophet said: “Do not greet the Jews and the Christians before they greet you, and when you meet any one of them on the roads force him to go to the narrowest part of it.”
Imam Ibn Maajah also transmitted the same narration with an addition “If they greet you saying As-Salamu ‘Alaykum (peace be upon you) reply them with "Wa ‘Alaykum" (and upon you too).”
The majority of the Muslim scholars hold the opinion mentioned in the Hadeeth that a Muslim should not start non-Muslims with greetings if he is in a Muslim country. If there is a mixed gathering of Muslims and non-Muslims one may greet them all by saying As-Salaamu ‘Alaykum intending Muslims. The evidence for this ruling is the Hadeeth reported by Imams Al-Bukhari and Muslim from Usaamah ibn Zaid who said that 'the Prophet passed by a gathering mixed of Muslims and Jews and greeted them by saying As-Salaamu ‘Alaykum.
The meaning of As-Salaamu ‘Alaykum is informing the person who is greeted that he is in peace and safety from all kinds of mischief from the side of the greeting person.
Some other scholars say As-Salaamu ‘Alaykum is a kind of glad tidings from Allah which He makes through Muslims who give glad tidings to each other that they are in peace from evil and they receive Allah's Blessing or Mercy. This glad tiding is being given to the persons due to their Islam and adhering to Allah's religion.
The reward is greater to the one who is better in greeting and begins first as the Prophet said: “The best of two Muslims is he who greets first.” [Al-Bukhari]
Anyway, “As-Salaam” (peace, safety) is a Name, Attribute, and Act of Allah, so pronouncing this word is a supplication of Allah. Therefore, this great word should be protected from those who do not believe in it, but they are enemies of As-Salam (a Name of Allah). Thus, when the Prophet wrote letters to the kings of Kuffars (disbelievers), he wrote in the beginning “Peace be upon those who follow the Guidance”; he did not write to the Kuffars the expression As-Salaamu ‘Alaykum.
However, some other scholars such as Ibn ‘Abbaas, Abu Umaamah and Ibn Muhaireez held the opinion that it is not permissible for a Muslim to greet a non-Muslim with the expression of As-Salaamu ‘Alaykum as he greets a Muslim. Instead one may greet by the expression “Salaam ‘Alayka” to a Kaffir but if they are more than one, he may greet them by “Salaam ‘Alaykum”. This is also a considerable opinion in the Shaafi’i School of jurisprudence.
Anyway, some scholars have the opinion that one may greet them by the usual greeting; i.e., as Muslims are greeted, only to avoid their harm or for any necessity or for any religious benefit. This opinion is held by Imams ‘Ikrimah, an-Nakha’i, and al-Awzaa-i who said: “If you greet the Kuffars with Salaam indeed it had been practiced by pious persons before. If you do not do so, that has also been practiced by pious persons.”
Finally, we conclude that it is forbidden for a Muslim in a Muslim country to greet Kuffars first for the Hadeeth mentioned before. If a Muslim is in a non-Muslim territory, then he may greet them first to avoid suspected harms and to show them his courteous behavior to attract them towards Islam. But it is better to use other expressions of greeting other than As-Salaamu ‘Alaykum.
For more benefit on greeting non-Muslims, please refer to Fatwa 88513 and 84225.
Allah knows best.