How to record the terminal and generate an animated gif

Those of us who do tutorials or create teaching guides know how important it is record our screenIn the same way, those of us who specialize in Linux, we have the need to record terminal, this is why we bring an application called Peek that in addition to helping us to record our terminal allows us to generate an animated gif of the recording.

What is Peek?

Peek is an open source tool, written in Vala by the German Philipp Wolfer, which allows us to record the terminal and generate an animated gif of what we do on it.

This simple but powerful tool has a window with a frame that serves to frame the terminal, it only has the button to record or stop recording, and once the recording is finished it gives you the option to save the gif wherever you want.

The tool can have many uses, but it has been designed mainly to share series of commands or actions that we do in the terminal. An example of the output of the tool below:

record terminal

How to install Peek

Peek installation is quite simple, it has packages for Arch Linux, Debian and derivatives, and it can also be installed from its source code, duly compiled in any distribution. the steps below

Install Peek from source code

You can compile and install Peek using CMake:

$ git clone https://github.com/phw/peek.git
$ cd peek/
$ cmake . && make
$ sudo make install

Install Peek on Arch Linux and derivatives

Arch Linux users and its derivatives can use the following PKGBuild available in AUR. You can install it with the following command:

$ yaourt -S peek

Install Peek on Ubuntu / Debian and derivatives

You can download the latest version of Peek's .deb package from here.. You can install it in the following way:

$ wget https://github.com/phw/peek/releases/download/v0.8.0/peek-0.8.0-Linux.deb
$ sudo apt install libsdl1.2debian ffmpeg libavdevice-ffmpeg56
$ sudo dpkg -i peek-0.8.0-Linux.deb
$ peek

How to record terminal with Peek

The process of recording the terminal and generating a gif of the recording is very simple and we list it below.

  1. We open a terminal and adapt it to the size we want.
  2. We run peek.
  3. We enlarge or reduce peek to fit the size of the terminal, we frame peek to fully fit the terminal bar.
  4. Press Record in peek.
  5. Before the 3 seconds wait, we go to the terminal and start executing the commands we want.
  6. When we have finished our procedure, click on stop, a window will automatically open to save the resulting gif.
  7. We choose where to save and save.
  8. We enjoyed our gif.

peek

This is a simple and fast way to record what we do in the terminal, but we can also use it to record any area of ​​our screen and generate an animated gif. We hope it will be of much use to you and we await your comments.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Daniel Smith said

    I could not compile it 🙁
    Could NOT find Vala (missing: VALA_EXECUTABLE)

    1.    lizard said

      Try installing Vala

  2.   Daniel Smith said

    To install vala
    sudo apt install valac

    By the way the last command in the installation from source code is:
    sudo make install

  3.   ROMSAT said

    Hello lizard,
    hey, after reading your great article and following all the steps to the letter, it doesn't stop working for me peek.
    My screen fills up with lines that start with frame = ...
    I've tried running it in the background by doing: $ peek &
    but neither does it do the same to me.
    I work with Ubuntu MATE.
    Come on, greetings from Malaga.

  4.   Anonymous said

    Hello, I have a question / suggestion. It may not be the right place to ask the question, but I don't know where.

    First of all, congratulations to you and to all the Editors for the good content on the site. They have helped me alot.

    Well, whenever I look for an article, I try to find the most recent or at least know the date of the article. I don't see it here. I have seen it in the list of new articles that appears on the home page but not within the post. Because I frequently get to a post from google, I never see the date.

    So the question is where does the date appear within the post? And if they don't show it, I think it would be good if they included it.

    Thank you.

    1.    Anonymous said

      I see that I am not the only one to whom this happens! It is really annoying to find an article about something you were looking for and, when you want to test what you are talking about, find that it no longer exists / works because it is out of date. Simply putting a few numbers, the date, would be solved, and I do not think it is something expensive, otherwise I would not write this comment.

      As a suggestion, what I usually do is look at the comments, that those do have a date, although of course, it is indicative, and I also usually search in various blogs, since it is common that replicas of articles are made, especially if it is something outstanding. But of course, you may not find it in any way and you will be left with the doubt forever.

      A greeting.

      1.    lizard said

        We have implemented your suggestion, from now on you will be able to see the date in the article (before you could do it from the cover)

  5.   nobody said

    Readers may also find the 'script' command interesting, which records a shell session to a text file, so it would not be necessary to record a video.