First of all, we’d like to state that a Muslim has to believe in existence of the jinn. They are mentioned in the Qur’an and Hadith. In many instances, they share with us many of our roles and actions. Every Muslim must also believe firmly that no one, however great his powers may be, can benefit or harm him unless Allah wills it.
Elaborating on the dwelling places of Jinn, Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, who states the following: “The jinn live where we do live on this earth. They are mostly to be found in ruins and unclean places like bathrooms, dunghills, garbage dumps and graveyards. Hence the Prophet (peace and blessings be upon him) taught us to take precautions when entering such places, by reciting the adhkar (mentioning Allah’s Name) prescribed by islam.
One of these are reported by AnasibnMalik (may Allah be pleased with him) who says: “When the Messenger of Allah (peace and blessings be upon him) entered the toilet, he would say, ‘Allahummainnia`udhubika min al-khubuthiwal-khaba’ith (O Allah, I seek Refuge with You from all offensive and wicked things [evil deeds and evil spirits]).’””