Asciinema – record your Terminal sessions

I have been working at learning a new program called Asciinema which will allow you to record Terminal sessions and share them on the Internet. For someone like me that wants to share everything that I learn with you this is an extremely valuable tool. I am excited to introduce you to this awesome program.

Asciinema
Asciinema

Asciinema is a fast, light-weight and open source Terminal recording tool. Asciinema not just records your Terminal activities, but also helps you to share them on the web if necessary. You can share the recordings by copying its URL and sending it to a friend or posting it on a social network. It is easy to use and in just about 10 minutes you will be a pro at using it.

Asciinema tool could be useful in the following situations:

  • The online trainers can record and share the Terminal session when teaching Linux commands to the students.
  • The students can share their Terminal activities to their online tutors when they have been given a command-line assignment.
  • The junior admins can record and share their Terminal activities to the remote technical support or subject matter experts when looking for help.
  • Technical writers or bloggers can record the terminal activities and use them while writing a book or blog post.

The possibilities are endless. Whatever it is, when it comes it to record a terminal session, Asciinema comes in handy! In this guide, we’ll be discussing how to install Asciinema in Mint and Raspbian and how to record your Terminal sessions using it. Also, we will see how to share the recorded terminal sessions on the web.

Install Asciinema

The good thing is the developers have packaged asciinema for almost all Linux distributions, and it’s available in the official repositories of many Linux distros. I have installed this on both Mint and Raspbian with excellent results.

sudo apt-get install asciinema

To install asciinema on Unix and other operating systems, refer the asciinema installation page: https://asciinema.org/docs/installation

Record Terminal Sessions using Asciinema

The usage is trivial. When you run “asciinema” without any argument, it will display the help section. Now, let us record a terminal session. To do so, run:

asciinema rec

Once you run the above command, you will see the following output.

~ Asciicast recording started.
~ Hit Ctrl-D or type “exit” to finish.

Now, your Terminal activities is being recorded and saved in the file called “test” in the current working directory.

Let us type some random commands.

df -h

ls -l

lscpu

pwd

uname -a

#In Raspbian on your Raspberry Pi type:

vcgencmd measure_temp

That’s enough. To finish the recording, press “CTRL+D” or type “exit”.

When the recording is ended, you will see the following message.

~ Asciicast recording finished.

You can copy and paste directly out of this window.

The direct link to this asciicast is:

https://asciinema.org/a/174219

 

Uploading the record session to asciinema.org site

Since we didn’t specify filename for the recording, you will asked to upload the resulting recording to asciinema.org website, so you can share it to your friends or social media or add it to your own blog/website.

Just share it to your colleague or friend or whoever wants to view your Terminal session in their web browser. Or, you can view it on your own browser itself.

Once your friend entered the above URL in their browser’s address bar, they can be able to see your recording.

To learn more you can check out the https://asciinema.org/ website. It is a small community right now but I believe that if enough people that use the Raspberry Pi’s with the Raspbian system that this will become a vibrant community.

I will be using Asciinema as I believe this to be a great teaching tool. Share this with your friends so we can all benefit from this unique way of sharing.

%d bloggers like this: