Speaking at the convocation ceremony of Banaras Hindu University (BHU) here, Modi said yoga had existed through the ages but it was only when Indians owned it with great pride that the UN announced an International Yoga Day on June 21.
The prime minister urged scholars not to treat 'deekshant' ceremonies (convocation) as 'shikshant' (end of education) but rather as the start of a new phase of learning and development.
Apart from spreading the good word about BHU through noble deeds, the graduating scholars should also try and give their best to the country and inspire others, Modi told the gathering.
"You should have the motivation and the ability to realize your dreams. That's the real test," he said to applause.
He said curiosity was the vital impulse to development and urged scholars to never allow the student in them to die.
"One should have the ability to rough it out, on the basis of knowledge, even in face of adversities. Be assured that every such person will make it big," he said.
The prime minister reached Varanasi, his parliamentary constituency, late on Sunday from Kolkata and spent the night at a guest house.
At Monday's convocation, 11,620 degrees were distributed.
The prime minister gave away medals to meritorious students. He was flanked by the chancellor of BHU, Karan Singh, and Union Human Resource Development Minister Smriti Irani.
The first convocation of BHU was held in 1919 when 32 degrees were given.