Twitter has undertaken legal actions against Elon Musk, who terminated the deal to purchase the social media giant days ago.