Shaking hands when meeting someone is a generally accepted and praiseworthy practice in all societies. In Islam, it is a Sunnah.
Imam An-Nawawi said: “It is recommended to shake hands when meeting. It is a sunnah without any difference of opinion.” [Al-Minhaaj Sharh Muslim 9/115]
Handshake was a common practice among the Sahaba and it is a way through which our sins are forgiven.
Anas (radhiyallahu anhu) said: “When they (the Sahaba) would meet they would shake hands.” [At-Tabarani, Al-Awsat 1/37]
Abu Hurayra (radhiyallahu anhu) reported that the Messenger of Allah (sallallahu alayhi wasallam) said: “Verily, when the Muslim shakes hands with his brother, both of their sins fall away like the falling of leaves from a tree.” [Al-Bazzaar 8335]
This practice has many benefits. It dispels hatred, rancour and grudges among the Muslims. It is an expression of brotherhood, love and frienship. [See for example: Ibn Muflih, Adaab ash-Shar’iyya 2/257]
The origin of this beautiful practice is from the blessed country, Yemen.
Anas (radhiyallahu anhu) reported that the Messenger of Allah (sallallahu alayhi wasallam) said: “The Yemenis have come to you. They are the first (nation) to practice handshake.” [Abu Dawud 5213]
There are many Hadiths regarding the virtues of Yemen and its people. They have the best of characters.
Abu Hurayra (radhiyallahu anhu) reported that the Messenger of Allah (sallallahu alayhi wasallam) said: “The people of Yemen have come to you and they are more gentle and soft-hearted. Iman is from Yemen and Wisdom is from Yemen.” [Al-Bukhari 4070]
May Allah protect Yemen from all those who wish to harm it and its beautiful people.
It should be noted here that shaking hands with non-mahram is strictly prohibited.