Record Terminal Activity For Ubuntu 16.04 LTS Server
Starting recording activities of a terminal session
Recording activities into a file
It is a good practice to store script recording session into a user defined a file with some timestamp so that it will be useful to refer it at a later point in time. For this, the script command needs to be executed by providing the desired file name as argument follows:$ script <file_name>
Below screenshot captures how the recording is stored in the user-supplied log file:
Appending recording activities into an existing file
It may be required to append the recording history into an existing log file. For this, the script command needs to be executed by providing the file name with “-a” option indicating append operation.$ script –a <existing_file_name>
More options can be obtained from script man page.