عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ لِيُسَلِّمِ الرَّاكِبُ عَلَى الْمَاشِي وَالْمَاشِي عَلَى الْقَاعِدِ وَفِي رِوَايَةٍ أَوِ الْمَارُّ بَدَلَ الْمَاشِي وَالْقَلِيلُ عَلَى الْكَثِيرِ زَادَ فِي رِوَايَةٍ وَالصَّغِيرُ عَلَى الْكَبِيرِ
Sayyiduna Abu Huraira (may Allah be pleased with him) narrates that the Noble Prophet (peace and blessings be upon him) said: The rider should greet the one who is walking, the one who is walking should greet the one who is sitting, those who are fewer in number should greet those who are greater in number, and the younger should greet the elder.