At the mosque
The mosque is the house of Allah, open to all. One comes clean, with ablution already made if possible, properly dressed and without a bad smell (garlic, onion, tobacco: al-Bukhari 855).
One enters with the right foot saying the entry supplication, leaves one's shoes in the place provided, prays two rak'at before sitting down, and keeps calm: phone on silent, no walking in front of someone praying.
mosquee.jpgإِنَّمَا يَعۡمُرُ مَسَٰجِدَ ٱللَّهِ مَنۡ ءَامَنَ بِٱللَّهِ وَٱلۡيَوۡمِ ٱلۡأٓخِرِ وَأَقَامَ ٱلصَّلَوٰةَ وَءَاتَى ٱلزَّكَوٰةَ وَلَمۡ يَخۡشَ إِلَّا ٱللَّهَۖ فَعَسَىٰٓ أُوْلَـٰٓئِكَ أَن يَكُونُواْ مِنَ ٱلۡمُهۡتَدِينَ﴿١٨﴾
The mosques of Allah are only to be maintained by those who believe in Allah and the Last Day and establish prayer and give zakah and do not fear except Allah, for it is expected that those will be of the [rightly] guided
فِي بُيُوتٍ أَذِنَ ٱللَّهُ أَن تُرۡفَعَ وَيُذۡكَرَ فِيهَا ٱسۡمُهُۥ يُسَبِّحُ لَهُۥ فِيهَا بِٱلۡغُدُوِّ وَٱلۡأٓصَالِ﴿٣٦﴾
[Such niches are] in mosques which Allah has ordered to be raised and that His name be mentioned therein; exalting Him within them in the morning and the evenings
The reference text
«إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَقُلِ اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ. وَإِذَا خَرَجَ فَلْيَقُلِ اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ»
“When one of you enters the mosque, let him say: ‘O Allah, open for me the gates of Your mercy.’ And when he leaves, let him say: ‘O Allah, I ask You of Your bounty.’”
Sahih Muslim 713 · Read on sunnah.com
«إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يَجْلِسَ»
“When one of you enters the mosque, let him pray two rak'at before sitting down.”
Sahih al-Bukhari 444 · Read on sunnah.com
«لَوْ يَعْلَمُ النَّاسُ مَا فِي النِّدَاءِ وَالصَّفِّ الأَوَّلِ، ثُمَّ لَمْ يَجِدُوا إِلاَّ أَنْ يَسْتَهِمُوا عَلَيْهِ لاَسْتَهَمُوا، وَلَوْ يَعْلَمُونَ مَا فِي التَّهْجِيرِ لاَسْتَبَقُوا إِلَيْهِ، وَلَوْ يَعْلَمُونَ مَا فِي الْعَتَمَةِ وَالصُّبْحِ لأَتَوْهُمَا وَلَوْ حَبْوًا»
“If people knew what there is in the call to prayer and the first row, and found no way but to draw lots for it, they would draw lots. If they knew what there is in coming early, they would race to it. And if they knew what there is in the night prayer and the dawn prayer, they would come to them even crawling.”
Sahih al-Bukhari 615 · Read on sunnah.com
«لاَ تَمْنَعُوا إِمَاءَ اللَّهِ مَسَاجِدَ اللَّهِ»
“Do not prevent the female servants of Allah from the mosques of Allah.”
Sahih al-Bukhari 900 · Read on sunnah.com
«خَيْرُ صُفُوفِ الرِّجَالِ أَوَّلُهَا وَشَرُّهَا آخِرُهَا وَخَيْرُ صُفُوفِ النِّسَاءِ آخِرُهَا وَشَرُّهَا أَوَّلُهَا»
“The best rows for men are the first and the least good the last; the best rows for women are the last and the least good the first.”
Sahih Muslim 440 · Read on sunnah.com
Sources: Sahîh al-Bukhârî 444, 615, 855, 900 ; Sahîh Muslim 440, 443, 666, 713 ; Sunan Abî Dâwûd 567 ; An-Nawawî, al-Majmû', bâb mâ yûjib al-ghusl ; Ibn Hazm, al-Muhallâ, kitâb at-tahâra