1

Output can be redirected to a text file with > followed by the destination text file. How can we redirect the output to another terminal window or tab?

> or 1> redirects standard output, 2> redirects error messages.

vanadium
  • 88,010

1 Answers1

1

To redirect to a different terminal, determine the file descriptor of the terminal with the command tty:

~$ tty
/dev/pts/0

Then redirect error messages to that terminal as in

~$ echo Hello World! >/dev/pts/0

See here to learn more about redirection of different outputs.

vanadium
  • 88,010