record terminal on linux with script

The script utility exists, and is installed by default on at least two systems I have access to. Works really well for interactive sessions!

script --timing=time.txt script.log
scriptreplay --timing=time.txt script.log

Seems to work when ran through screen, even when the screen is detached!

How to Record and Replay Linux Terminal Sessions using ‘script’ and ‘scriptreplay’ Commands

output terminal live on another screen

This is really cool: command line - How to have a terminal mirrored onto a second screen in a two-monitor setup? - Ask Ubuntu

script -f /tmp/lecture1.scrpt
tail -F /tmp/lecture1.scrpt

-f is for “Flush output after each write.” (as opposed to “write everything to the file when script is terminated”)