Используйте «скрипт» - машинопись терминала.
$ script --help
Со страницы руководства script
:
script makes a typescript of everything printed on your terminal. It is useful for students who need a hard‐ copy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).