Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:16967a
Request/Fix translation

  

السيوطي:١٦٩٦٧a

"كُن فِي الدنْيَا كأنكَ غرِيبٌ، أو عَابِر سَبِيل، وَعُدَّ نَفْسَكَ من أهْل القبورِ".  

ابن المبارك، [حم] أحمد [ت] الترمذي [هـ] ابن ماجة عن ابن عمر

See similar narrations below:

Collected by Ibn Mājah, Aḥmad, Aḥmad's Zuhd, Suyūṭī
ibnmajah:4114Yaḥyá b. Ḥabīb b. ʿArabī > Ḥammād b. Zayd > Layth > Mujāhid > Ibn ʿUmar

“The Messenger of Allah ﷺ took hold of some part of my body and said: ‘O ‘Abdullah, be in this world like a stranger, or one who is passing through, and consider yourself as one of the people of the graves.’”  

ابن ماجة:٤١١٤حَدَّثَنَا يَحْيَى بْنُ حَبِيبِ بْنِ عَرَبِيٍّ حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ عَنْ لَيْثٍ عَنْ مُجَاهِدٍ عَنِ ابْنِ عُمَرَ قَالَ

أَخَذَ رَسُولُ اللَّهِ ﷺ بِبَعْضِ جَسَدِي فَقَالَ يَا عَبْدَ اللَّهِ كُنْ فِي الدُّنْيَا كَأَنَّكَ غَرِيبٌ أَوْ كَأَنَّكَ عَابِرُ سَبِيلٍ وَعُدَّ نَفْسَكَ مِنْ أَهْلِ الْقُبُورِ  

ahmad:5002Abū Muʿāwiyah > Layth > Mujāhid > Ibn ʿUmar

“The Messenger of Allah ﷺ took hold of some part of my body and said: ‘O ‘Abdullah, be in this world like a stranger, or one who is passing through, and consider yourself as one of the people of the graves.’” (Using translation from Ibn Mājah 4114)   

أحمد:٥٠٠٢حَدَّثَنَا أَبُو مُعَاوِيَةَ حَدَّثَنَا لَيْثٌ عَنْ مُجَاهِدٍ عَنِ ابْنِ عُمَرَ قَالَ

أَخَذَ رَسُولُ اللهِ ﷺ بِثَوْبِي أَوْ بِبَعْضِ جَسَدِي وَقَالَ يَا عَبْدَ اللهِ كُنْ كَأَنَّكَ غَرِيبٌ أَوْ عَابِرُ سَبِيلٍ وَعُدَّنَفْسَكَ مِنْ أَهْلِ الْقُبُورِ  

ahmad-zuhd:43ʿAbdullāh from my father > Abū Muʿāwiyah > Layth > Mujāhid > Ibn ʿUmar

“The Messenger of Allah ﷺ took hold of some part of my body and said: ‘O ‘Abdullah, be in this world like a stranger, or one who is passing through, and consider yourself as one of the people of the graves.’” (Using translation from Ibn Mājah 4114)  

الزهد لأحمد:٤٣حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنَا أَبِي حَدَّثَنَا أَبُو مُعَاوِيَةَ حَدَّثَنَا لَيْثٌ عَنْ مُجَاهِدٍ عَنِ ابْنِ عُمَرَ قَالَ

أَخَذَ رَسُولُ اللَّهِ ﷺ بِثَوْبِي أَوْ بِبَعْضِ جَسَدِي فَقَالَ «يَا عَبْدَ اللَّهِ كُنْ فِي الدُّنْيَا كَأَنَكَ غَرِيبٌ أَوْ عَابِرُ سَبِيلٍ وَعُدَّ نَفْسَكَ مِنْ أَهْلِ الْقُبُورِ»