In this recipe, we are going to learn how to record terminal sessions. We are going to use the ttyrec tool to do this.
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
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