Tag Archives: record terminal

Record Ubuntu Terminal Output History In Text

We know that our Terminal (more precisely, our bash) saves commands history in .bash_history file. But we also know that our Terminal doesn’t save the output of every command. How if we want to do that and save output as a text file? For example, we want to analyze every command output or learn how apt-get works (like me). We can do it with a program named script from util-linux package from Linux Kernel Archive. The program is pre-installed in Ubuntu. I will show you how to use it and how to run it every time Terminal starts.

How To Use script


As I said above, script program is pre-installed in Ubuntu. To use it, just type script in Terminal. Then use your Terminal as usual. To stop script from recording, press Ctrl+D in Terminal. The record is saved in Home by default. The record is named typescript (yes, without any .txt extension) by default.
Continue reading Record Ubuntu Terminal Output History In Text