The program peek can be used to make animated gifs in Linux. You can record a screen area or the complete screen.
The screen recorder comes with an easy to use interface.
You put the Peek window over the area you want to record and click “Record”.
Peek is optimized for generating animated GIFs, but you can record to other formats like WebM or MP4 if you prefer.
Peek works on X11 and Wayland (GNOME Shell).
If you run Ubuntu Linux you can easily install peek.
To install Peek (Ubuntu) open a terminal and type:
sudo add-apt-repository ppa:peek-developers/stable sudo apt update sudo apt install peek
Peek is available by default (Fedora 29 and later):
sudo dnf install peek
The package ffmpeg must be installed too:
sudo dnf install ffmpeg
To run download the .AppImage file and make it executable
chmod 755 yourapp.AppImage
Then just run it.
You can name the file however you want, e.g. you can name it just peek and place it in $HOME/bin for easy access.