I asked Anas, "Was it a custom of the companions of the Prophet (ﷺ) to shake hands with one another?" He said, "Yes."
Sahih al-Bukhari Book 79, Hadith 37