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