How can I take the input and the output of a terminal? To be more specific, what I want to do is to take everything that is typed in the terminal, and everything that the "terminal" types (in real time).
Start a logged session with
If you need timing info for a realistic replay, use
Copy/paste method usually works for simple input/output.
In case you'd like to monitor what's going on within another terminal window try tmux.
You may find more here