Is there any way to echo something to another terminal session, obtained from the who command? For example, root user echoes a message to a different user's terminal session, after getting their session from who. Is this possible?
Asked
Active
Viewed 414 times
0
Tyler Selden
- 113
- 1
- 6
-
Something like `write someone pts/2` after `mesg y`? Or directly `echo "Hi" 1> /dev/pts/1` – Pablo Bianchi Nov 04 '22 at 01:54
-
2Does this answer your question? [Terminal Output Redirected to another user's terminal](https://askubuntu.com/questions/1452200/terminal-output-redirected-to-another-users-terminal) – Raffa Mar 05 '23 at 17:49
1 Answers
1
That's very much possible with the write command
Example
$ write username </dev/ttyX>
Hareesh Harihar
- 36
- 2