The write and wall commands are part of most Linux distributions. If a user is logged in multiple times, you may need to specify the terminal you wish to send a message to.
You can determine a user's terminals with the who command:
$> who
user1 pts/0 2017-01-16 13:56 (:0.0)
user1 pts/1 2017-01-17 08:35 (:0.0)
The second column (pts/#) is the user's terminal identifier.
The write and wall programs work on a single system. The talk program can connect users across a network.
The talk program is not commonly installed. Both the talk program and talk server must be installed and running on any machine where talk is used. Install the talk application as talk and talkd on Debian-based systems or as talk and talk-server on Red Hat-based systems. You will probably need to edit /etc/xinet.d/talk and /etc/xinet.d/ntalk to set the disable field to no. Once you do this, restart xinet:
# cd /etc/xinet.d
# vi ntalk
# cd /etc/init.d
#./xinetd restart