Fundamentals 7 min read

Create Stunning Linux Terminal GIFs with VHS: Install and Step‑by‑Step Guide

This guide explains how to install the VHS command‑line utility on various Linux distributions and use it to record terminal commands as animated GIFs, covering setup, tape file creation, command sequencing, and final GIF generation.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Create Stunning Linux Terminal GIFs with VHS: Install and Step‑by‑Step Guide

Linux terminals are powerful, but creating visual tutorials can be cumbersome; VHS (Video Home System) simplifies turning terminal sessions into animated GIFs.

Installing VHS

VHS requires ttyd and ffmpeg. Install ttyd via snap if supported: sudo snap install ttyd --classic On Debian‑based systems, add the Charm repository key and source, then install:

curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
sudo echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ " | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install vhs

On Arch Linux, use the AUR package: yay -S vhs-bin For Fedora and RHEL, add the Charm repo and install with yum:

echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
sudo yum install vhs

Creating a GIF with VHS

VHS uses files with the .tape extension. Create a new tape file: vhs new linuxmi.tape Edit the tape with your favorite editor (e.g., nano) and add commands. Useful directives include: Output filename.gif – set output file. Set FontSize 15, Set Width 1200, Set Height 600 – configure appearance. Type "command" – simulate typing a command. Sleep 200ms – pause before next line. Enter – simulate pressing Return. Hide / Show – hide or reveal subsequent commands.

Example tape content that records a custom neofetch display:

Output linuxmi.gif
Set FontSize 15
Set Width 1200
Set Height 600
Type "neofetch --ascii linuxmi.txt"
Sleep 500ms
Enter
Sleep 5s

After saving the .tape file, generate the GIF: vhs < linuxmi.tape The resulting animated GIF captures the typed commands and their output, providing a compact visual tutorial.

Benefits

Using VHS to create terminal GIFs is quick, lightweight, and ideal for documentation, tutorials, or showcasing command‑line workflows without the overhead of video files.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxTutorialGIFterminalcommand-lineVHS
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.