We went out with the Messenger of Allah ﷺ, and he used to pray the traveler's prayer, meaning two rakahs. We also traveled with Abu Bakr and Umar, and with Uthman for six years of his rule, and they prayed two rakahs as well. Then Uthman began praying four.
حدثنا محمد بن جعفر حدثنا شعبة عن خبيب يعني ابن عبد الرحمن عن حفص بن عاصم
خرجنا مع رسول الله ﷺ فكان يصلي صلاة السفر يعني ركعتين ومع أبي بكر وعمر وعثمان ست سنين من إمرته ثم صلى أربعا