Sahih Muslim 687 b
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَعَمْرٌو النَّاقِدُ، جَمِيعًا عَنِ الْقَاسِمِ بْنِ مَالِكٍ، - قَالَ عَمْرٌو حَدَّثَنَا قَاسِمُ بْنُ مَالِكٍ الْمُزَنِيُّ، - حَدَّثَنَا أَيُّوبُ بْنُ عَائِذٍ الطَّائِيُّ، عَنْ بُكَيْرِ بْنِ الأَخْنَسِ، عَنْ مُجَاهِدٍ، عَنِ ابْنِ عَبَّاسٍ، قَالَ إِنَّ اللَّهَ فَرَضَ الصَّلاَةَ عَلَى لِسَانِ نَبِيِّكُمْ صلى الله عليه وسلم عَلَى الْمُسَافِرِ رَكْعَتَيْنِ وَعَلَى الْمُقِيمِ أَرْبَعًا وَفِي الْخَوْفِ رَكْعَةً .
Ibn 'Abbas reported:
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.
Full reference and source
Sahih Muslim 687 b In-book : Book 6, Hadith 7 USC-MSA web (English) : Book 4, Hadith 1464 (deprecated)
View source on Sunnah.com (opens in a new tab)