ENOfficial
Ibn ‘Abbas said, “God has prescribed the prayer by the tongue of your Prophet as four rak'as when resident, two when travelling, and one when danger is present.” Muslim transmitted it.
Source: sunnah.com
Other translations
Arabic
وَعَنِ ابْنِ عَبَّاسٍ قَالَ: فَرَضَ اللَّهُ الصَّلَاةَ عَلَى لِسَانِ نَبِيِّكُمْ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فِي الْحَضَرِ أَرْبَعًا وَفِي السَّفَرِ رَكْعَتَيْنِ وَفِي الْخَوْف رَكْعَة. رَوَاهُ مُسلم
sunnah.com