How it works...

When you run the ttyrec command, the terminal record session will be started. The recording will go on until you type exit. As soon as you type exit, the recording will be stopped and a file will be created in your current working directory. The filename will be ttyrecord. You can play this file by running the ttyplay command. Run the ttyrecord file as follows:

$ ttyplay ttyrecord

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.