The Prophet (ﷺ) said: When three are on a journey, they should appoint one of them as their commander. Nafi' said: We said to AbuSalamah: You are our commander.
Sunan Abi Dawud Book 15, Hadith 133