To write a message to users that have login, you can using the command write. But before that, you need to check who is login, and which terminal he is login to, use command who.
Let say you was unable to call your friend, maybe he forgot to bring his cellphone and you know he is login to a linux server doing something, and you have permission to ssh to that particular server, then you can write him a message.
who will list of all user have login and and login to which terminal, you will see something like pts/0, pts/1.
aizatto pts/0 2007-03-10 02:21 (:0.0)
With the information, now you can write messages to the user aizatto.
write aizatto pts/0
After typing the command line above, you can start to type your messages. When you hit enter, you message will be send to that terminal. Terminate the write by ctrl+D.
You can cat a file and pipe to write command too.
cat memo.txt | write aizatto pts/0
You can broadcast your message to all login user with wall command. wall, write to all.
cat announcement.txt | wall
Or simply type wall, then start to write your message. For wall, the message will be send only after you hit ctrl+D. And the message will be send to all users that login including you.