Sahih Muslim #1576 · The Book of Marriage

Sahih MuslimIbn 'Abbas reported
Sahih Muslim · Book 16 · The Book of Marriage
Sahih Muslim · كتاب 16 · كتاب النكاح
Allah has prescribed the prayer by the tongue of your Apostle (ﷺ) as two rak'ahs for the traveller, four for the resident, and one in danger.
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَعَمْرٌو النَّاقِدُ، جَمِيعًا عَنِ الْقَاسِمِ بْنِ مَالِكٍ، - قَالَ عَمْرٌو حَدَّثَنَا قَاسِمُ بْنُ مَالِكٍ الْمُزَنِيُّ، - حَدَّثَنَا أَيُّوبُ بْنُ عَائِذٍ الطَّائِيُّ، عَنْ بُكَيْرِ بْنِ الأَخْنَسِ، عَنْ مُجَاهِدٍ، عَنِ ابْنِ عَبَّاسٍ، قَالَ إِنَّ اللَّهَ فَرَضَ الصَّلاَةَ عَلَى لِسَانِ نَبِيِّكُمْ صلى الله عليه وسلم عَلَى الْمُسَافِرِ رَكْعَتَيْنِ وَعَلَى الْمُقِيمِ أَرْبَعًا وَفِي الْخَوْفِ رَكْعَةً ‏.‏
Reference : Sahih Muslim 1576In-book reference : Book 6, Hadith 7