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.
abudawud:466Ismāʿīl b. Bishr b. Manṣūr > ʿAbd al-Raḥman b. Mahdī > ʿAbdullāh b. al-Mubārak > Ḥaywah b. Shurayḥ > Laqīt ʿUqbah b. Muslim Faqult Lah Balaghanī Annak Ḥaddatht > ʿAbdullāh b. ʿAmr b. al-ʿĀṣ

I met ‘Uqbah b. Muslim and said to him: it has been reported to me that someone has narrated to you from the prophet ﷺ that when he entered the mosque, he would say: I seek refuge in Allah, the Magnificent, and in His noble face, and in his eternal domain, from the accursed Devil. He asked : is it so much only? I said: Yes. He said: when anyone says so. The devil says: he is protected from me all the day long.  

أبو داود:٤٦٦حَدَّثَنَا إِسْمَاعِيلُ بْنُ بِشْرِ بْنِ مَنْصُورٍ حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ عَنْ عَبْدِ اللَّهِ بْنِ الْمُبَارَكِ عَنْ حَيْوَةَ بْنِ شُرَيْحٍ قَالَ لَقِيتُ عُقْبَةَ بْنَ مُسْلِمٍ فَقُلْتُ لَهُ بَلَغَنِي أَنَّكَ حَدَّثْتَ عَنْ عَبْدِ اللَّهِ بْنِ عَمْرِو بْنِ الْعَاصِ

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