Riyad as-SalihinChapter 5Hadith 178
Full Sharh — Riyad as-Salihin 178
عن أبي هريرة رضي الله عنه أن رسول الله صلى الله عليه وسلم قال: "يسلم الراكب على الماشي، والماشي على القاعد، والقليل على الكثير” ((متفق عليه)) وفي رواية للبخاري: "والصغير على الكبير"
English Translation
Abu Hurairah (May Allah be pleased with him) reported:: The Messenger of Allah (ﷺ) said, 'A rider should greet a pedestrian; a pedestrian should greet one who is sitting; and a small group should greet a large group (of people).'' . The narration in Al-Bukhari adds: The Messenger of Allah (ﷺ) said, "The young should greet the elderly.''
Source
Riyad as-Salihin(رياض الصالحين)
The Book of Greetings
Hadith Number
178