Make GIF in Linux with one simple command

make GIF in Linux

Have you ever wondered how to create a GIF animation? In Linux, you can do it with one simple command. In the article, I will show you how to make GIF in Linux.

You can watch the video tutorial or continue reading below.

GIF is the Graphics Interchange Format. Basically, it is a very simple animation file. If you have read my posts on how to how to make Xfce look modern and beautiful, you have already seen this GIF with app icons.

Make GIF in Linux
App icons from different themes.

I created it from these three images.

Make GIF in Linux. Prepared images
Make GIF in Linux. Prepared images

I will use them in this tutorial. But you can also extract images from a video and use them to create a GIF from a video.

Preparation stage

To make GIF in Linux, you need to install ImageMagick. If you use any Debian based distro like Linux Mint, Ubuntu or elementary OS, run this command:

sudo apt-get install imagemagick

If you use any other distro, find this app in your package manager. After that, place all the images you want to create a GIF from in one folder. I put these images in the gif-icons folder.

Make GIF in Linux

In the directory with images, click the right mouse button and open the Terminal. Then, run the command:

convert -delay 100 -loop 0 *.jpeg animatedGIF.gif

where delay specifies the time in milliseconds how fast the animation will change a frame, and loop indicates how many loops to run. When you choose 0, it will run infinitely.

When the command is executed, you get the GIF file in that directory.

Make GIF in Linux. Ready GIF
Make GIF in Linux. Ready GIF

I advise to leave the default meaning of loop, as in this case the animation will replay infinitely. At the same time, you can change the delay value. The larger the value, the slower the animation will be.

For the better quality, make sure that all your images are of the same size and resolution. It is also a good idea to compress the images as much as possible.


It is really easy to make GIF in Linux. All you need is to run one command in the terminal. However, if you prefer graphical interface, you can extract images from video with VLC and make GIFs in GIMP.

Do you know any other way to an animated GIF in Linux?

Average Linux User
Average Linux User I am the founder of the Average Linux User project, which is a hobby I work on at night. During the day I am a scientist who uses computers to analyze genetic data.


Learn how to write in Markdown with this Quick Reference.
Notify me of new comments on this post.
* E-mail is used to display Gravatar.