TITLE: Get the commands history from GAP system
QUESTION [5 upvotes]: I am not sure whether this was asked before, but I didn't find a reference in GAP system documentation on how to print the history of the command line (Ubuntu installation).
For instance:
gap> G := Group((1,2)(3,4),(1,2,3));
> irr := Irr(G);

How to save or print the list of my previous commands (similar to history command on Ubuntu).
Many thanks.

REPLY [6 votes]: There are three commands that will do all variations of this:

LogTo("filename.txt") will save all subsequent input and output to a file with the specified name.
InputLogTo("filename.txt") will save all subsequent input to a file with the specified name.
OutputLogTo("filename.txt") will save all subsequent output to a file with the specified name.

In all three cases, running the command with no argument will stop the logging. More details can be found here in the GAP Manual.