2

I put a simple echo command in a CLI tty by user1 expecting it to reach user2 who is logged in a separate tty.

echo "Hello, world!" >> /dev/tty5

I expected user2 to get the echo message but nothing shows up.

Does each user get his/her own "set" of tty[1-7]?

Edit: I suspect this may be a permissions issue. I was actually exploring cron jobs and had set a cron job to echo a "hello world" message every minute from user1 logged into tty2 directed to tty5 where user2 is logged in but user2 never got the echoed messages.

haziz
  • 2,241

1 Answers1

2

If user2 is logged into tty5, he is the owner of /dev/tty5. If he has messaging enabled, then you can send him a message using write user2, but if he doesn't, you're out of luck unless you are root. echo "Hello, world!" >> /dev/tty5 only works if executed by root or by user2.

cpast
  • 328