Redirect_Console_Output

Redirect_Console_Output

Redirect console output to another console.

First list out open console(pts).

[root@localhost ~]# ll /dev/pts/
total 0
crw--w----. 1 root tty  136, 0 Jan 22 21:09 0
crw--w----. 1 root tty  136, 1 Jan 22 08:53 1
crw--w----. 1 root tty  136, 2 Jan 22 21:04 2
crw--w----. 1 root tty 136, 3 Jan 22 21:04  3
c---------. 1 root root   5, 2 Jan 21 17:11 ptmx

From the output, we can see we have 4 pts terminal (0, 1, 2 and 3).

Here I am going to redirect output to “pts/3”.

[root@localhost ~]# /bin/bash > /dev/pts/3

 In the screenshot, we can see command output redirect to “pts3”

Leave a Reply

Your email address will not be published. Required fields are marked *