How to make an animated GIF of your terminal commands

Paul Czarkowski
Oct 6, 2017 · 1 min read

Sometimes a dump of text in a code block just isn’t enough. Here’s how to record your terminal session turn it into an animated GIF.

Install the following:

Record, GIFerize, and Optimize your terminal:

$ ttyrec bacon
# do some stuff
$ ttygif bacon
$ gifsicle -O3 -k 8 --lossy=80 -o tty-small.gif tty.gif
$ ls -alh tty*.gif
-rw-rw-r-- 1 bob bob 386K Oct 6 16:10 tty.gif
-rw-rw-r-- 1 bob bob 186K Oct 6 16:12 tty-small.gif
ttyrec of using ttyrec <insert yo dawg meme here>

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade