Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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).

share|improve this question

2 Answers 2

script should be what you are looking for (man page).

Start a logged session with script /path/to/your/logfile, every command and its output will be logged into the logfile.

If you need timing info for a realistic replay, use script -t=/path/to/your/timingfile /path/to/your/logfile. Afterwards, you can replay the log using scriptreplay /path/to/your/timingfile /path/to/your/logfile.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.