How to: Snoop / View Other Linux Shell User Typescript of Terminal Session
Q. How do I make typescript of terminal session for training purpose or just to monitor other user terminal under Linux?
A. Use script command. It makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment or use this tool to demonstrate some concepts.
Login as student and type the following two commands:
$ mkfifo hardcopy
$ script hardcopy
Login as instructor and type the following command to view typescript of terminal session for student user:
$ cat /home/student/hardcopy
Now anything typed by user student, including all commands and other sessions, will be displayed to the instructor user screen. Use this trick to demonstrate Linux configurations and command usage to student or just to monitor their activity in a classroom.