There are several programs that make this happen, but after I tried some of them I found very useful one of them KAZAM
It’s very simple to install
sudo apt-get install kazam
And just run it
You can view this post for other options for it
http://hackerspace.kinja.com/screen-recording-in-linux-1686055808