How to you mirror the stdout of one terminal to another one

mirrorterminal

I'm not sure if I'm phrasing the question correctly, but let's say that I have two virtual terminals open, and if I typed ls in one of them, I'd get the contents of the directory in both of them (the second one doesn't have to be writable, it only needs to display the stdout of the first one). How would I go about achieving this?

Best Answer

As geekosaur mentioned screen will do what you need (and much much much more).

First, create a named screen session for convenience in your first terminal:

$ screen -S foo

Second, attach to the screen session in your second terminal:

$ screen -x foo
Related Question