HOWTO record your desktop with ffmpeg
From LinuxReviews
Jump to navigationJump to searchThe universal go-to command-line media conversion tool ffmpeg can easily make a video recording of your desktop in addition to just converting videos.
Simply run this command in a terminal
ffmpeg -f x11grab -s 1024x768 -r 30 -i :0.0 -sameq output.mkv
and you're recording. press ctrl-c when you've recorded enough.
It's good enough for a quick recording but it's not exactly full of features. OBS is what you are looking for if you want a easy to use graphical application for this purpose.