in reply to Copy terminal lines-unix

use the built in linux script command

script makes a typescript of everything displayed on your terminal. It is useful for students who need a hardcopy record of an
interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).