There may be various users who are logged in one local system. If you are only user on a system this tutorial is not meant for you. However, you can learn from it. This tutorial is meant for the system admin who might need users information and need to communicate with users. System admin can actually do so using the Terminal with “write” utility. Let’s first check out the two utilities which provides information about who is using the system, what are they doing and how the system is running.
who: list users on system
This utility simply list the users who is using the system. Remember, all the users who is using the system must be connected to a network with logged in date and time.
w: list users on system(Detail information)
This utility also list the logged in users with the the additional information on how long the user has been idle, how much computer processor time each user has used during login session and the commands each user are running.
There’s a similar utility like “w” called “finger.” You need to install finger utility in your system. It is available in repository of all Linux systems.
Write: send messages to logged in user of same system
This is the utility that we are waiting for. Write sends a message to another logged in user. The syntax is:
write username [terminal]
The username is the username you want to communicate with. The terminal is optional which is the device name. You can display the user names and device names of logged in users by using who, w or finger commands.
To establish the two way communications both the user should execute write command. To quit messaging hit “Ctrl+D”.
By default, accepting messages are turned off for security reasons. You must allow other users to send you message. Use the following command:
You can block messages using following command: