The script command records, in a specified file, everything you type and every response you receive during your terminal session. To save the contents of your session in a file called logsession, type
script logsession