Script (Unix)
The script command is a Unix utility that records a terminal session. It dates back to the 1979 3.0 Berkeley Software Distribution (BSD).
The script command is a Unix utility that records a terminal session. It dates back to the 1979 3.0 Berkeley Software Distribution (BSD). LOGNAME="script" rm -f $LOGNAME.p $LOGNAME.log mknod $LOGNAME.p p tee $LOGNAME.p 2>&1 The above script records to all output of the command. However, some interactive programs (such as Python) do not echo their standard input when run under the resulting shell, although they do when run under the script command, again due to the detection of a terminal. == Alternatives to script command== The ttyrec program from 2000 provides the same kind of functionality and offers several bindings. The timing is similar to util-linux. A more modern take on the concept is "asciicast" JSON, used by asciinema.
References
No reference rows published for this article.
Cite this article
MLA
"Script (Unix)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/script-unix. Accessed 24 November 2026.
Chicago
"Script (Unix)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/script-unix.
APA
encyclopegia.org. (2025). Script (Unix). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/script-unix
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON