The Linux script Command: Record Your Shell Sessions @tutoriaLinux
The Linux script Command: Record Your Shell Sessions  @tutoriaLinux
Uploaded May 2017 | Updated September 2026, 2 weeks ago
A quick how-to on how to use the Linux script(1) command to record your shell sessions. Whether it's for documentation, for capturing a hard-to-replicate issue, or to prove that you've done something according a certain way, knowing the basics of the script(1) command can be extremely useful.

0:27 Common Uses
0:40 The simplest way to use the Linux script command
1:39 Inspecting script's shell log
2:06 Changing the default shell log filename
2:42 Real-time Recordings - SUPER USEFUL
3:30 Inspecting a real-time recording log
3:50 Replay a real-time script shell recording (one that was recorded with timing info)
4:45 Inspecting the Timing Log (script(1) timestamp file)
5:21 Recording shell output from a single command (useful in bash scripts, etc.)
6:46 Review of commands for recording and replaying Linux shell sessions
7:44 Important Note






# Simplest Way to Log Shell Sessions
script simplescript.log

# A single command
script -c 'netstat -tupln' netstat.log

# Add timing information, so you can replay the shell session later
script myscript.log --timing=time.log

# Replay a captured shell session (with timing info)
scriptreplay -s myscript.log --timing=time.log
scriptreplay -s myscript.log -t time.log


Full Linux Sysadmin Course: youtube.com/playlist?list=PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK

Check out my project-based Linux System Administration course (free sample videos): udemy.com/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?couponCode=tl35

Official Site & e-mail list: tutorialinux.com
Twitter: twitter.com/tutorialinux
Facebook: facebook.com/tutorialinux
Patreon: patreon.com/tutorialinux
The Linux script Command: Record Your Shell SessionsDeus Ex & DevOps Episode 1System/Linux/DevOps Engineer InterviewData Science and Machine Learning Book Bundle (& Python, R)Interview with a Software & Infrastructure EngineerPython 3 Programming Course: 1 - Installing Python on Windows 7, 8, and 10How to Backup and Restore a MySQL/MariaDB DatabaseTech Careers: Should You Be a Specialist or A Generalist?Python 3 Programming Course: 9 - If, Elif, and ElseLinux Shell Aliases: What You Need to KnowProgramming Ruby 06   Array OperationsHow to tail (follow) Linux Service Logs
tutoriaLinux |

The Linux 'script' Command: Record Your Shell Sessions

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER