Abu Hurairah reported,

The Prophet ﷺ said, "Whoever enters this mosque of ours to learn something good or to teach it is like one striving in the path of Allah, and whoever enters it for any other purpose is like one gazing at something that does not belong to him."

Azami 1115

Hasan

عن أبي هريرة

عن النبي ﷺ: من دخل مسجدنا هذا ليتعلم خيرا، أو ليعلمه كان كالمجاهد في سبيل الله، ومن دخله لغير ذلك كان كالناظر إلى ما ليس له.

الأعظمي 1115حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Virtue of one who goes out seeking knowledge
Numbering
Jami al-Kamil 1115 (2nd edition)
Azami 1115