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 Aḥ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.”