Recording and playing back terminal sessions
Recording a screen session as a video is useful, but a video is an overkill for debugging terminal sessions or providing a shell tutorial.
The shell provides another option. The script
command records your keystrokes and the timing of keystrokes as you type, and saves your input and the resulting output in a pair of files. The scriptreplay
command will replay the session.
Getting ready
The script
and scriptreplay
commands are available in most GNU/Linux distributions. You can create tutorials of command-line hacks and tricks by recording the terminal sessions. You can also share the recorded files for others to playback and see how to perform a particular task with the command line. You can even invoke other interpreters and record the keystrokes sent to that interpreter. You cannot record vi, emacs, or other applications that map characters to particular locations on the screen.
How to do it...
Start recording the terminal session with the following...