It was narrated that Ibn 'Abbas said: "The prayer of the resident was enjoined on the tongue of your Prophet (ﷺ), four (rak'ahs), and the prayer of the traveler is two rak'ahs, and the prayer of fear is one rak'ah"
SahihSahihSahihBook 15 · Hadith 9
سنن النسائي
It was narrated that Ibn 'Abbas said: "The prayer of the resident was enjoined on the tongue of your Prophet (ﷺ), four (rak'ahs), and the prayer of the traveler is two rak'ahs, and the prayer of fear is one rak'ah"