Abu Qatada reported,

The Prophet ﷺ said, "When one of you enters the mosque, let him pray two units of prayer before sitting down."

Ibn Majah 1013

Sahih

حدثنا العباس بن عثمان حدثنا الوليد بن مسلم حدثنا مالك بن أنس عن عامر بن عبد الله بن الزبير عن عمرو بن سليم الزرقي

عن أبي قتادة

أن النبي ﷺ قال إذا دخل أحدكم المسجد فليصل ركعتين قبل أن يجلس

ابن ماجه 1013صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Whoever enters the masjid should not sit down until he prays
Numbering
Darussalam 1013
Ibn Majah 1013