Salim b. 'Abdullah (b. 'Umar) reported on the authority of his father that Messenger of Allah ﷺ observed the prayer of a traveller, i. e. two rak'ahs in Mina, and other places; so did Abu Bakr and 'Umar, and 'Uthman too observed two rak'ahs at the beginning of his caliphate, but he then completed four.
عَنْ رَسُولِ اللَّهِ ﷺ أَنَّهُ صَلَّى صَلاَةَ الْمُسَافِرِ بِمِنًى وَغَيْرِهِ رَكْعَتَيْنِ وَأَبُو بَكْرٍ وَعُمَرُ وَعُثْمَانُ رَكْعَتَيْنِ صَدْرًا مِنْ خِلاَفَتِهِ ثُمَّ أَتَمَّهَا أَرْبَعًا