Ubuntu – Write command in one terminal, see result on other one

command linegnome-terminal

I want to run a command foo on one terminal and pass the result to another terminal. Is it possible to do this ?

Best Answer

Yes, it is. A picture worth a thousand words:

radu's terminal

So, you have to redirect the output of your command using > operator to /dev/pts/#. You can find # using who or w command. If tou want to redirect and the errors, use:

<command> >& /dev/pts/#