asciinema is a tool for recording terminal sessions into .cast files, which can be replayed and shared without the need for screencasts.
To be honest, I’m not sure why you would want to record your terminal sessions using anything other than a screencast application. However, if you’re curious about how to do it with asciinema, I’ll explain it here.
asciinema is a command-line utility that allows you to record terminal activity without using any special applications. The recordings are saved in a format that can be replayed using the same tool.
To install asciinema, you’ll first need to install pipx using the command sudo apt install pipx
, and then you can install asciinema itself with pipx install asciinema
.
There are alternative installation options as well, which you can explore on this page.
To start recording a terminal session, use the command:
asciinema rec test.cast
Here, .cast is the name of your future recording file.
Now, you can perform any necessary actions in the terminal, and they will be recorded automatically. To stop the recording, press Ctrl+D or type exit.
The completed recordings will appear in the user’s home directory as .cast files.

To play back a recorded file, use the command:
asciinema play test.cast
You can share these recordings with the world on asciinema’s official website using the command:
asciinema upload demo.cast
Below you can see an example of such a recording: