TTYRec



Setup


$ sudo apt install ttyrec
$ sudo apt install ttygif

Usage


$ ttyrec
<interact with the session>
$ exit

# Find the recording
$ ls ./ttyrecord

# Replay the recording
$ ttyplay ./ttyrecord

# Convert to animated gif
$ ttygif ./ttyrecord

See also: https://web.archive.org/web/20080618024933/http://timjoh.com/how-to-record-and-play-nethack-games-with-ttyrec-and-ttyplay-live/