Answers:
您可以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).
您只需要将您tty
的输出文件提供给script
:
script -f /dev/tty1