Linux Terminal Session Recording: 3 Easy Methods

Quick Linux Tip #109:

Question: How do I record my terminal session and replay it like a video?

Try: script --timing=session.timing session.log

Info: Records terminal input/output alongside precise timing data for real-time playback.

Examples:

  • $ script -t 2>session.timing session.log  # Legacy syntax for timing file capture
  • $ scriptreplay --timing=session.timing session.log -d 2  # Replay session at 2x playback speed
  • $ asciinema rec demo.cast  # Modern alternative for web-shareable recordings

Note: Ideal for training demonstrations, compliance archiving, and incident logging. Does not capture graphical (GUI) or mouse activity.




LinuxTeck.com
linuxteck:~$ script --timing=session.timing session.log
Script started, output log file is 'session.log'.

linuxteck:~$ ls -la
total 48
drwxr-xr-x 5 linuxteck linuxteck 4096 Oct 17 09:23 .
drwxr-xr-x 3 root     root     4096 Oct 01 09:00 ..
drwxr-xr-x 2 linuxteck linuxteck 4096 Oct 15 14:12 Documents

linuxteck:~$ exit
exit
Script done, output log file is 'session.log'.

linuxteck:~$ scriptreplay --timing=session.timing session.log
(Replays the entire session at original speed with keystrokes)
linuxteck:~$

PREVIOUS ARTICLE Quick Linux Tip #108: Linux Log Compression: 4 Steps to Save Disk Space NEXT ARTICLE Quick Linux Tip #110: Linux LUKS Keyfile: 4 Steps to Automate Disk Unlocking
About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.