Asciinema is an open-source terminal recording tool that makes it super easy to share your command-line work with others. Unlike traditional screen recorders that capture heavy video files, Asciinema records your terminal activity in a lightweight, text-based format, which means the recordings are tiny in size, perfectly reproducible, and can be shared or embedded it into your website or blog with just a small snippet of code.

Here’s a quick demo of Asciinema in action: https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH?autoplay=1

Notable features:

  • Capture your terminal sessions and play them back exactly as they happened, including pauses, typos, and fixes.
  • Share what you’re doing in real time, either through a local web server or the remote asciinema.org service.
  • Recordings are text-based, not video, which means they’re tiny in size and can be compressed down to almost nothing (as low as 15% with gzip or zstd).
  • Built-in integration with asciinema.org makes it simple to upload and share your recordings instantly with a single command.

Installing Asciinema in Linux

Installing Asciinema is quick and simple; in fact, it’s already available in the default repositories of most popular distributions, so you don’t need to hunt for packages or download anything manually, just open your terminal and run the command that matches your distro:

sudo apt install asciinema         [On Debian, Ubuntu and Mint]
sudo dnf install asciinema         [On RHEL/CentOS/Fedora and Rocky/AlmaLinux]
sudo emerge -a sys-apps/asciinema  [On Gentoo Linux]
sudo apk add asciinema             [On Alpine Linux]
sudo pacman -S asciinema           [On Arch Linux]
sudo zypper install asciinema      [On OpenSUSE]    
sudo pkg install asciinema         [On FreeBSD]

Recording Your First Session

Once you’ve installed Asciinema, you can start recording in seconds, and the recorder will immediately begin capturing everything you do in the terminal, such as every command, every keystroke, and even your typos and corrections.

asciinema rec

When you’re finished, simply type:

exit

At this point, Asciinema will ask if you’d like to upload the session to asciinema.org. If you choose yes, it will instantly generate a shareable link that you can send to your teammates or embed in your blog.

Record and Share Linux Terminal Sessions
Record and Share Linux Terminal Sessions

Replaying a Recording in Linux

If you’ve saved your terminal session locally, you can replay it anytime with a single command:

asciinema play demo.cast

This will play back your recording exactly as it happened, including pauses, typos, corrections, and everything you typed. It’s like watching a live terminal session in real time, but from the comfort of your saved file.

This is especially useful for reviewing your work, sharing tutorials with colleagues, or debugging scripts step by step without having to rerun commands manually.

Embedding Recordings in a Website

One of the coolest features of Asciinema is how easy it makes sharing your terminal demos on a website or blog. Once you’ve uploaded a recording to asciinema.org, you’ll get a small HTML <script> snippet, like this:

<script src="https://asciinema.org/a/12345.js" id="asciicast-12345" async></script>

All you need to do is copy and paste the above script into your blog post or webpage, and your readers will see an interactive terminal session right in your content. They can play it, pause it, or even follow along with your commands.

Conclusion

If you’re looking for a clean, efficient, and beginner-friendly way to record your Linux terminal, Asciinema is exactly what you need. Unlike traditional screen recorders, it’s lightweight, fast, and text-based, so your recordings are tiny, easy to share, and fully reproducible.

Asciinema works smoothly across all major Linux distributions and is perfect for bloggers, educators, sysadmins, and anyone who wants to share terminal workflows with others.

So next time someone asks you, “How did you do that in Linux?”, don’t explain it in long paragraphs, just record it and share the link. Your readers, teammates, or students will thank you!

Similar Posts