Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-06-2006, 09:31 PM   #1
LQ Newbie
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
How do I echo a message to a terminal on another IP address

Hi. Im using SUSE. I've recently learned how to send messages between terminals with echo and tty. This is what I know (please correct if I'm a real newbie on linux):

I open the second terminal (the one I want to send the message to) and use tty to gets its name

I go back to my first terminal (the one Im sending the message from) and type this:

echo "message" > address_given_by_tty

It works great, mostly because its in the same machine. What I want to know is how do I echo a message to a remote terminal on another machine (I know its reduntant the "remote", but anyhow) in the same LAN. More specifically, how do I echo a message to a terminal in another machine by its IP address. Thanks.
Old 12-06-2006, 09:45 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
You can use the write command to send messages locally which is probably betther than using your method (read "man write" for more details). Unfortunately AFAIK it only works locally. To send messages to a remote host you could try talk or rwall. These utilities may not be installed on you system but there should be packages available.
Old 12-06-2006, 10:05 PM   #3
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Instead of doing the echo and re-directing to the other user's tty, you can use the write command. See the write manpage for more info. A user can specify if they want to receive messages in a given tty using the mesg command. "mesg n" turns off messages, "mesg y" turns them on.

Between machines is a different matter. Assuming you have an account on it, you could log into the remote machine with ssh and use write in the ssh session.

If that's not good for you for some reason, the best thing to do is use an IM setup. Jabber is an open protocol and you can get free clients and servers.
1 members found this post helpful.
Old 12-07-2006, 07:41 AM   #4
LQ Newbie
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
we usually annoy other users in the network in a different way:

ssh to their machine ... n then
echo "message to be displayed" >> /dev/console


set a crontab there ...


init 0 (shutdown their computer)
Old 12-07-2006, 10:48 AM   #5
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Assuming you can ssh to the machine, and allow X forwarding with your sshd config, and have ssh set the Xauthority file, you could also ssh and execute xmessage, or kdialog or something. That's bound to really annoy the users

For all of these ssh-based alert, you've got a scalability problem. ssh handshakes make quite a lot of load on both parties, so if you're sending to a large number of machines fro one machine, the sender will get hammered quite heavily.
Old 05-13-2013, 09:04 AM   #6
LQ Newbie
Registered: Mar 2011
Posts: 2

Rep: Reputation: 1
Have you tried the TALK command?

UNIX and LINUX has a command utility for "talking" between terminals, sort of like a text-based chat.

The server service (in case it's not installed on your system) is "talkd"
and the client service is "talk". Install them both, on both systems.

You might also want to install "fingerd" and "finger" ...
These give you a quick reference to identify a user, their contact info and the terminal(s) they are currently logged on to.

Hope this help!
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ethernet to Serial Terminal Echo andig Linux - Newbie 1 01-22-2006 06:25 PM
Ethernet to serial Terminal Echo on thin Client andig Linux - Software 0 01-20-2006 12:21 AM
gmplayer message at start-"echo 1024 > /proc/sys/dev/rtc/max-user-freq" Mutation_1101 Slackware 7 01-11-2006 08:46 PM
Prevent Terminal Echo Using Python (for Passwords) taylor_venable Programming 4 07-06-2005 12:52 AM
behaviour of echo with ? (the question mark) in gnome-terminal fsbooks Programming 1 01-08-2004 01:41 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration