asciinema - Screencasts auf der Kommandozeile

  Lioh Möller   Lesezeit: ~1 Minute

Mit asciinema lassen sich auf einfache Weise Screencasts der Kommandozeile erstellen.

Für Linux stehen eine Vielzahl von guten Screencast Anwendungen zur Verfügung, wie zum Beispiel VokoscreenNG. Davon erlauben allerdings nur wenige eine Aufnahme der tty. Dies kann insbesondere auf Systemen sinnvoll sein, auf denen keine grafische Oberfläche zur Verfügung steht.

asciinema schliesst diese Lücke und bietet, einmal installiert, eine einfache Möglichkeit einen Screencast der Kommandozeile zu erstellen. Sei es zu Dokumentationszwecken oder zur Erstellung von Schulungsunterlagen, die Einsatzmöglichkeiten sind vielfältig.

Auf einem Debian GNU/Linux System lässt sich die Anwendung aus den offiziellen Repositories installieren:

sudo apt install asciinema

Eine Aufnahme erfolgt im einfachsten Falle mit folgendem Befehl:

asciinema rec meineersteaufnahme.cast

Die Aufnahme lässt sich durch Eingabe von exit oder durch ein Drücken von Ctrl+D beenden.

Eine Wiedergabe erfolgt mithilfe des play Parameters:

asciinema play meineersteaufnahme.cast

Der Anbieter der Software stellt ausserdem eine Möglichkeit des uploads von Aufnahmen auf https://asciinema.org zur Verfügung.

asciinema upload meineersteaufnahme.cast

Solange man dort kein Konto erstellt hat, wird diese allerdings nach 7 Tagen automatisch gelöscht. Erstellte Aufnahmen lassen sich so auf einfache Weise einbetten oder teilen.

Weitere interessante Parameter sind:

  • --idle-time-limit= : legt einen Schwellwert der Inaktivität fest.
  • --title=</code> : gibt den Titel der Aufnahme an.</li> <li><code class="inline">--command=<command></code> : darüber lässt sich ein Befehl zur Aufnahme festlegen.</li> <li><code class="inline">--append</code> : hängt eine neue Aufnahme an eine vorhandene an.</li> </ul> <p>Eine detaillierte <a href="https://asciinema.org/docs/how-it-works" title="How it works - asciinema" target="_blank" rel="noopener">Dokumentation</a> steht auf der Webseite des Projektes in englischer Sprache zur Verfügung.</p> </div> </article> <aside> <h3 class="mb-4">Mehr zum Thema</h3> <div id="related-list" class="mb-5"> <a href="https://gnulinux.ch/internet-radio-hoeren-mit-shortwave"><h2 class="h5 mb-2 pb-2 border-bottom">Internet Radio hören mit Shortwave</h2></a> <a href="https://gnulinux.ch/debianissimo-linux-für-aeltere-menschen"><h2 class="h5 mb-2 pb-2 border-bottom">Debianissimo - Linux für ältere Menschen</h2></a> <a href="https://gnulinux.ch/q4os-4-gemini-windows-installer"><h2 class="h5 mb-2 pb-2 border-bottom">Q4OS 4 Gemini Windows installer</h2></a> <a href="https://gnulinux.ch/schnelle-hilfe-mit-tealdeer"><h2 class="h5 mb-2 pb-2 border-bottom">Schnelle Hilfe mit tealdeer</h2></a> <a href="https://gnulinux.ch/python-basierte-entwicklerdistribution-snakeware"><h2 class="h5 mb-2 pb-2 border-bottom">Python basierte Entwicklerdistribution Snakeware</h2></a> </div> </aside> <div class="mb-4"> <!-- Load Plugins: Page End --> <h2>Tags</h2><a href="https://gnulinux.ch/tag/verfügung">Verfügung</a>, <a href="https://gnulinux.ch/tag/asciinema">asciinema</a>, <a href="https://gnulinux.ch/tag/aufnahme">Aufnahme</a>, <a href="https://gnulinux.ch/tag/kommandozeile">Kommandozeile</a>, <a href="https://gnulinux.ch/tag/linux">Linux</a>, <a href="https://gnulinux.ch/tag/screencast">Screencast</a>, <a href="https://gnulinux.ch/tag/parameter">Parameter</a><br/><br/><div class="html-at-page-end"><h2>Community</h2> <p style="text-align: left;"><a href="https://gnulinux.ch/mitmachen-bei-gnu-linux-ch#mitreden" target="_blank" rel="noopener"><img src="https://gnulinux.ch/bl-themes/andy/img/mitreden.svg" style="margin-left: 20px; border: none;" alt="Mitreden" width="50px"></a><a href="https://gnulinux.ch/mitschreiben" target="_blank" rel="noopener"><img src="https://gnulinux.ch/bl-themes/andy/img/mitschreiben.svg" style="margin-left: 40px; border: none;" alt="Mitschreiben" width="50px"></a><a href="https://gnulinux.ch/unterstuetzen" target="_blank" rel="noopener"><img src="https://gnulinux.ch/bl-themes/andy/img/spenden.svg" style="margin-left: 40px; border: none;" alt="Spenden" width="50px"></a></p> <p style="text-align: left;"><a href="https://gnulinux.ch/mitmachen-bei-gnu-linux-ch#mitreden" target="_blank" rel="noopener">Mitreden</a>, <a href="https://gnulinux.ch/mitschreiben" target="_blank" rel="noopener">Mitschreiben</a>, <a href="https://gnulinux.ch/unterstuetzen" target="_blank" rel="noopener">Spenden</a></p> <hr> </div> <div id="comments" class="snicker-comments"> <div id="comments-form" class="snicker-comments-form"> <form class="comment-form" method="post" action="https://gnulinux.ch/asciinema-screencasts-auf-der-kommandozeile?snicker=comment#snicker"> <div class="comment-header"> <div class="table"> <div class="table-cell align-left"> <input type="text" id="comment-user" name="comment[username]" value="" placeholder="Dein Name" /> </div> <div class="table-cell align-right"> <input type="email" id="comment-mail" name="comment[email]" value="" placeholder="Deine E-Mail-Adresse" /> </div> </div> </div> <div class="comment-article"> <p style="margin-bottom: 0px;margin-top: 3px;"> <textarea id="comment-text" name="comment[comment]" placeholder="Dein Kommentar..."></textarea> </p> </div> <div class="comment-footer"> <div class="table"> <div class="table-cell align-left"> </div> <div class="table-cell align-right"> <input type="hidden" name="tokenCSRF" value="a66d4eb3aef5beafcaf08d9fd026d5d3c9a105c9" /> <input type="hidden" name="comment[page_uuid]" value="80a125e64613fdb89453cd2d376c0959" /> <input type="hidden" name="action" value="snicker" /> <button name="snicker" value="comment" data-string="Antworten">Abschicken</button> </div> </div> </div> </form> </div><div id="comments-list" class="snicker-comments-list"> <div class="no-comments"> Es wurden noch keine Kommentare verfasst, sei der erste! </div> </div> </div> </div> <div class="mt-5 border-bottom d-lg-none"></div> </main> <aside class="col-12 col-lg-4 col-xxl-3 mt-5 mt-lg-0 sidebar-grid"> <div class="plugin plugin-sitemap-table-generator pb-2 mb-4 border-bottom"><div class="plugin-content mb-4"> <form method="get" action="/searchResult"> <div class="input-group"> <input id="search-nav" class="form-control" type="search" name="search" placeholder="Suchen" aria-label="Suchen"> <button class="btn btn-primary px-3" type="submit" ><i class="icon-search"></i><span class="visually-hidden">Suchen</span></button> </div> </form> </div></div><div class="plugin plugin-categories"><h2 class="plugin-label">Kategorien</h2><div class="plugin-content"><ul><li><a href="https://gnulinux.ch/category/apps">Apps (838)</a></li><li><a href="https://gnulinux.ch/category/desktop">Desktop (92)</a></li><li><a href="https://gnulinux.ch/category/distros">Distros (597)</a></li><li><a href="https://gnulinux.ch/category/events">Events (162)</a></li><li><a href="https://gnulinux.ch/category/gesellschaft">Gesellschaft (373)</a></li><li><a href="https://gnulinux.ch/category/in-eigener-sache">In eigener Sache (112)</a></li><li><a href="https://gnulinux.ch/category/meinung">Meinung (188)</a></li><li><a href="https://gnulinux.ch/category/podcast">Podcast (168)</a></li><li><a href="https://gnulinux.ch/category/privacy">Privacy (41)</a></li><li><a href="https://gnulinux.ch/category/projekte">Projekte (290)</a></li><li><a href="https://gnulinux.ch/category/spiele">Spiele (89)</a></li><li><a href="https://gnulinux.ch/category/technik">Technik (296)</a></li><li><a href="https://gnulinux.ch/category/testberichte">Testberichte (94)</a></li><li><a href="https://gnulinux.ch/category/tippstricks">Tipps & Tricks (564)</a></li></ul></div></div><div class="plugin plugin-pages"><h2 class="plugin-label">Artikelvorschläge</h2><div class="plugin-content"><ul><li><a href="artikelvorschlaege#a64f20ba025a470b295095d52b02aa77">Docker Services erreichen mittels Traefik</a></li><li><a href="artikelvorschlaege#888719b99762b8ce1397ddd29f9c47c9">Empfehlungen "Soundkarten" für Rasberry-Pi</a></li><li><a href="artikelvorschlaege#5b24df770c5e982eaace93515e32bb86">Libre Workspace</a></li><li><a href="artikelvorschlaege#248b6a97fe03b93954ce4c7eda51aa54">Verteilte Dateisysteme Privat nutzen sinnvoll/howto</a></li><li><a href="artikelvorschlaege#ac85f397be601ca19b07b65dbe7bcad7">Proxmox auf dem Laptop snapshots und umzug zim neuen device</a></li><li><a href="artikelvorschlaege#31a904eccf9260d852657508af81c81a">openSUSE Kalpa-Review</a></li><li><a href="artikelvorschlaege">...</a></li></ul><a class="btn btn-outline-primary" href="/artikelvorschlag-einreichen">Vorschlag einreichen</a></div></div><br><div class="plugin plugin-pages"><h2 class="plugin-label"><a href="https://linuxnews.de" target="_blank"><img src="/linuxnews-logo-full.svg" alt="LinuxNews.de" /></a></h2><div class="plugin-content"><small>08.08.2025</small><ul><li><a href="https://linuxnews.de/was-ist-beim-upgrade-auf-debian-13-zu-beachten/">Was ist beim Upgrade auf Debian 13 zu beachten?</a></li></ul><small>07.08.2025</small><ul><li><a href="https://linuxnews.de/opensuse-leap-16-0-rc-verfuegbar/">openSUSE Leap 16.0 RC verfügbar</a></li><li><a href="https://linuxnews.de/proxmox-backup-server-4-0/">Proxmox Backup Server 4.0</a></li></ul><small>06.08.2025</small><ul><li><a href="https://linuxnews.de/flameshot-13-grosses-update-fuer-die-screenshooter-app/">Flameshot 13: Großes Update für die Screenshooter-App</a></li><li><a href="https://linuxnews.de/proxmox-ve-9-0-offiziell-freigegeben/">Proxmox VE 9.0 offiziell freigegeben</a></li></div></div><div class="plugin plugin-pages"><h2 class="plugin-label">Unterstützen</h2><div class="plugin-content"><ul> <a href="https://de.liberapay.com/gnulinuxch/donate" target="_blank"><img src="https://gnulinux.ch/bl-themes/andy/img/liberapay.svg" alt="GNU/Linux.ch auf Liberapay unterstützen" width="225px"></picture></a> </ul> <div class="border-bottom mb-2"></div> <h2>Partner</h2> <ul> <a href="https://www.adfinis.com/ueber-uns/jobs/?mtm_campaign=hiring&mtm_source=affiliate&mtm_medium=ad&mtm_group=gnulinux" target="_blank" rel="noopener"><picture><source srcset="https://gnulinux.ch/bl-content/uploads/pages/52ff1b59c369e0947f01bb2cc76782d1/Adfinis_WeAreHiring_hell_transparent.png" media="(prefers-color-scheme: dark)"><img src="https://gnulinux.ch/bl-content/uploads/pages/52ff1b59c369e0947f01bb2cc76782d1/Adfinis_WeAreHiring_dark.png" alt="Adfinis AG" width="220px"></picture></a><br/><br/> </ul> <ul> <a href="https://www.heinlein-support.de" target="_blank"><picture><source srcset="https://gnulinux.ch/bl-themes/andy/img/heinlein_weiss.svg" media="(prefers-color-scheme: dark)"><img src="https://gnulinux.ch/bl-themes/andy/img/heinlein_rgb.svg" alt="heinlein" width="220px"></picture></a><br/><br/> </ul> <ul> <a href="https://intevation.de/" target="_blank"><picture><source srcset="https://gnulinux.ch/bl-themes/andy/img/intevation-logo-darkmode.png" media="(prefers-color-scheme: dark)"><img src="https://gnulinux.ch/bl-themes/andy/img/intevation.png" alt="Intevation GmbH" width="220px"></picture></a><br/><br/> </ul> <ul> <a href="https://shop.nitrokey.com/de_DE/shop?aff_ref=20" target="_blank"><picture><source srcset="https://gnulinux.ch/bl-themes/andy/img/nitrokey-logo-darkmode.svg" media="(prefers-color-scheme: dark)"><img src="https://gnulinux.ch/bl-themes/andy/img/nitrokey.svg" alt="Nitrokey" width="220px"></a> </ul> </div></div> </aside> </div> </section> <script> $(document).ready(function() { $('#comment-text').markdownToolbar(false); }); </script> <footer class="footer container text-center"> <div class="border-top py-4 mt-3"> <div class="social"> <ul class="social justify-content center"> <li title="Matrix"> <a class="social-link" href="https://matrix.to/#/#gnulinuxch:matrix.sp-codes.de" target="_blank"> <img class="social-img" src="https://gnulinux.ch/bl-themes/celestia/img/github.svg" alt="Matrix" /> <span class="social-title">Matrix</span> </a> </li> <li title="RSS"> <a class="social-link" href="https://gnulinux.ch/rss.xml" target="_blank"> <img class="social-img" src="https://gnulinux.ch/bl-themes/celestia/img/gitlab.svg" alt="RSS" /> <span class="social-title">RSS</span> </a> </li> <li title="FediGov"> <a class="social-link" href="https://fedigov.eu/" target="_blank"> <img class="social-img" src="https://gnulinux.ch/bl-themes/celestia/img/codepen.svg" alt="FediGov" /> <span class="social-title">FediGov</span> </a> </li> <li title="Mastodon"> <a class="social-link" href="https://social.anoxinon.de/@gnulinux" target="_blank"> <img class="social-img" src="https://gnulinux.ch/bl-themes/celestia/img/mastodon.svg" alt="Mastodon" /> <span class="social-title">Mastodon</span> </a> </li> <li title="Podcast"> <a class="social-link" href="https://gnulinux.ch/podcast/gnulinux_newscast_rss.xml" target="_blank"> <img class="social-img" src="https://gnulinux.ch/bl-themes/celestia/img/vk.svg" alt="Podcast" /> <span class="social-title">Podcast</span> </a> </li> </ul> </div> <p class="mb-0"><a href="https://creativecommons.org/licenses/by-sa/4.0/deed.de">CC-BY-SA 4.0</a> - GNU/LINUX.CH</p> </div> </footer> <button type="button" id="scrolltopbtn" class="btn btn-primary rounded-circle position-fixed d-none" onclick="scrollToTop()" style="bottom:1rem; right:1rem"><i class="icon-arrow-top"></i></button> <script src="https://gnulinux.ch/bl-themes/celestia/js/bootstrap.bundle.min.js?version=3.14.1"></script> <script src="https://gnulinux.ch/bl-themes/celestia/js/custom.js?version=3.14.1"></script> <script src="https://gnulinux.ch/bl-plugins/autoLightbox/glightbox/glightbox.min.js"></script> <script type='text/javascript'> const lightbox = GLightbox({ touchNavigation: true, loop: true, autoplayVideos: true }); </script> <script>var links = document.querySelectorAll( 'a' ); for (var i = 0, length = links.length; i < length; i++) {if (links[i].hostname != window.location.hostname) {links[i].target = '_blank';}}</script> <script src="/bl-plugins/prism/js/prism.js"></script> </body> </html>