Hadith on Loneliness: The Prophet prohibits total social isolation

Ibn Umar reported: The Prophet, peace and blessings be upon him, prohibited isolation, that a man spend the night alone or travel alone.

Source: Musnad Aḥmad 5618

Grade: Sahih (authentic) according to Ahmad Shakir

Al-Tabari said, “This is discouragement in the form of discipline and guidance, as it is feared that one alone might succumb to loneliness and isolation, yet it is not unlawful. The lone traveler in the wilderness and likewise the lone resident in his house are not safe from succumbing to loneliness, especially if one is afflicted by bad thoughts and a weak heart.”

Source: Fatḥ al-Bārī 2693

عَنِ ابْنِ عُمَرَ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ نَهَى عَنْ الْوَحْدَةِ أَنْ يَبِيتَ الرَّجُلُ وَحْدَهُ أَوْ يُسَافِرَ وَحْدَهُ

5618 مسند أحمد مسند المكثرين من الصحابة

8/38 المحدث أحمد شاكر خلاصة حكم المحدث إسناده صحيح في مسند أحمد

وَقَالَ الطَّبَرِيُّ هَذَا الزَّجْرُ زَجْرُ أَدَبٍ وَإِرْشَادٍ لِمَا يُخْشَى عَلَى الْوَاحِدِ مِنَ الْوَحْشَةِ وَالْوَحْدَةِ وَلَيْسَ بِحَرَامٍ فَالسَّائِرُ وَحْدَهُ فِي فَلَاةٍ وَكَذَا الْبَائِتُ فِي بَيْتٍ وَحْدَهُ لَا يَأْمَنُ مِنْ الِاسْتِيحَاشِ لَا سِيَّمَا إِذَا كَانَ ذَا فِكْرَةٍ رَدِيئَةٍ وَقَلْبٍ ضَعِيفٍ

2693 فتح الباري شرح صحيح البخاري