Makerere University

Enter a keyword or two into the search box above and click search..

Linux Basics: ‘Script’ Command Records Whatever You Do In The Terminal

You are here

Mostly, we, all, use the Up/Down arrow keys or the history command to find out the previously entered commands in Terminal. Unfortunately, we can’t view the output of the previously entered commands using the above methods. We can just see the commands only. If you are working on a GUI desktop, you can have a plenty of applications/tools to see or record your Terminal activities, including the previously entered commands and their corresponding output. But, What if you have only CLI mode servers? Here is where script command comes in handy.

What is Script command?
From the man pages;

Script 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, as the typescript file can be printed out later with lpr(1). If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.

To Learn more follow this link

This will enhance knowledge of those embracing open source technology