That person is nearest to Allah Ta’âla who utters the salâm first. (i.e. one who does not wait for the opposite party to make salâm first.
Greet every Muslim, whether acquainted or not. (Bukhari)
Salâm should always be made before talking. (Tirmidhi)
When replying to a salâm that has been conveyed through a third person, answer by saying: Wa Alaika Wa Alayhis Salâm. (Nasa’i)
After making salâm, if a barrier such as a tree or wall appears between them (where the view is obscured) one should make salâm again when meeting them.
A mounted person should greet the one who is walking, and a person on foot should greet the one who is sitting; a smaller group should greet a larger group and the young should greet their elders. (Bukhari)
When entering a house, make salâm to the occupants of that house.
When leaving that place (i.e. house), depart with making salâm (Baihaqi)
When entering ones own house, one should make salâm to ones family; this will be a source of blessings for one and one’s family. (Tirmidhi)
The completion of visiting the sick is by placing ones hand on the sick person’s forehead, and the completion of salâm is the shaking of the hands. (Ahmad)
When two Muslims meet and shake hands, their (minor) sins are forgiven before they depart. (Tirmidhi)
Do not greet the Jews and Christians ( i.e all non-Muslims) with the words of salâm. (Muslim)