Contents
Answer : The ‘script’ command is used to record a user’s login session in a file. Script command can be implemented in a shell script or can directly be used in terminal. Here is an example which records everything between script and exit.
How do I record a Linux terminal session?
Record the session
- Open an SSH terminal. Replace the example IP address in the following command with your IP address or hostname. …
- Start a script session. …
- Run any commands that you want to record. …
- When done, exit the script session by typing exit or pressing Ctrl-D.
- Files named typescript.
14 сент. 2020 г.
How can record session activity?
Make sure that the output path /var/log/session directory already exists on the system. If not, create it. Change the /var/log/session directory permission to 777 , which allows all users to write their session activity in the session directory.