How to do it...

To record terminal data, we use the ttyrec tool. You can also play the recorded data. Now, to record the terminal session, enter the ttyrec command in the terminal. You can end the recording by typing exit. Run the following command to record the terminal session:

$ ttyrec

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.