(35) باب مَا يُقَالُ عِنْدَ دُخُولِ الْقُبُورِ وَالدُّعَاءِ لأَهْلِهَا
Sulaiman b. Buraida narrated on the authority of his father that the Messenger of Allah (ﷺ) used to teach them when they went out to the graveyard. One of the narrators used to say this in the narration transmitted on the authority of Abu Bakr:
" Peace be upon the inhabitants of the city (i. e. graveyard)." In the hadith transmitted by Zuhair (the words are):" Peace be upon you, the inhabitants of the city, among the believers, and Muslims, and God willing we shall join you. I beg of Allah peace for us and for you."
Reference: Sahih Muslim 975
In-book reference: Book 11, Hadith 133
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 2128