Communicate with other users in your terminal using “write” command


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.

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.

who

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.

w

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:

mesg y

You can block messages using following command:

mesg n

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s