Step 1 : Write $username pts/X --> who / w / ps command
Step 2 : Now write any message you want. To end the message, type CTR+D. Your message will be sent.
The "mesg" command allows you control write access to your terminal by other users.
mesg [n|y]
Talk syntax : talk person [ttyname]
person : If you want to talk to someone on your own machine, then person is just the person's login name. If you want to talk to a user on another host, then person is of the form 'user@host'.
[ttyname]: If you want to talk to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name, where ttyname is of the form 'ttyXX' or 'pts/X'.
https://github.com/wikisoft/collection/blob/master/public/Linux%20Shell%20Scripting%20Cookbook,%202nd%20Edition.pdf
Send mail to another users :