Rahul urged people to take pledge to protect "till last breath" the ideas the Father of the Nation stood for.
"Remembering Bapu on his birth anniversary. Let's pledge to protect and defend the ideas he stood for till our last breath. #GandhiJayanti," he tweeted.
Born on this day in 1869, Gandhi led India's struggle for independence and also influenced movements for civil rights in other parts of the world. He was assassinated in January 1948.
Shastri, India's second prime minister, was born in 1904 and served in the office between June 1964 and January 1966.