To capture the screen of a terminal, at the prompt, type the following:

#script

The system displays information similar to the following:

Script command is started. The file is typescript.

Everything displayed on the screen is now copied to the “typescript” file.

To stop the script command, press Ctrl-D or type exit and press Enter.

The system displays information similar to the following:

^D
Script command is complete. The file is typescript.

Use the cat command to display the contents of your file.