Communicating from the command line with Unix

Read Time:3 Minute, 54 Second

Communicating with other users on the Linux command line is possible, and it’s easy.

One can easily communicate with other users on the Unix command line.

It is quite easy to send messages to other users on the Linux command line, but several interesting commands deserve more explanation. This is the case for the four commands below. Here’s how they work.

wall Command

The wall command (short for “write to all”) sends a message to all users currently logged into the system. This implies that the system is probably a server and the users are working on the command line. Typically, the wall command is used by system administrators to send notices to users to allow them to send information (for example, that the server is down for maintenance). But any user can use it.

A system administrator might send a message like: The system will be unavailable in 15 minutes to resolve a serious problem.

All users who log into the system will see a message like this: Message posted by [email protected] (pts/0) (Thursday March 5 08:56:42 2020): The system will be inaccessible in 15 minutes to resolve a serious problem .

If you want to use single quotes in your message, enclose it in double quotes like this:

$ wall “Remember to save your work before logging out”.

The outer quotes will not appear in the transmitted message, but without them the command will still wait for a final closing quote.

message command

If for some reason you don’t want to accept messages from another user, you can block them from being forwarded with the mesg command. This command can be used with an ‘n’ argument to deny mail from the user or a ‘y’ argument to allow mail to arrive.

$ mesg n doug $ mesg y doug

The blocked user will not be notified that their messages have been blocked. You can also block or allow all messages with a mesg command like this:

$mesg and

$ mesg n

Commande write

Another command allows you to send a text without having to go through email. This is the write command. It can be used to communicate with a specific user.

$ write nemo Are you still at your desk? I need to talk to you right away. ^C

Enter your text and use ^C to exit when finished. The command allows you to send a text, but does not allow you to start a two-way conversation. She just sends the text. If the user is logged in to multiple devices, you can specify which device you want to send the message to, or you can let the system choose the one with the shortest idle time.

$ write nemo#1

If the user you are trying to write to has blocked messages, you should see something like this:

$ write nemo write: nemo has disabled messages

Commande talk/ytalk

The talk or ytalk command is used to launch an interactive chat with one or more other users. The command brings up a double pane (top and bottom) window. Each person will type in the upper part of the screen and see the answers in the lower section(s). People can respond to a chat request by typing “talk” followed by the username of the person speaking to them.

Message de [email protected] à 10:10 …

talk: connection requested by [email protected]

talk: reply to: talk [email protected]

$ talk dory

The window can involve more than two participants if ytalk is used. As you can see in the example below (the output of the “talk dory” command shown above), talk is often ytalk.

—————————-= YTalk version 3.3.0 =————————– Report ready? ——————————-= [email protected] =—————————- Just finished it

As explained above, on the correspondent’s terminal, the conversation is reversed:

—————————-= YTalk version 3.3.0 =————————– Just finished it —————————-= [email protected] =——— ——————- Is the report ready?

Again, use the ^C command to exit.

To talk with someone on another system, just add a -h option and the hostname or IP address with a command like this:

$ talk -h 192.168.0.11 nemo

In conclusion

There are several simple commands to send messages to other logged in users on Linux systems. These commands can be particularly useful if you need to send a quick message to all users, or if you prefer a direct exchange to a phone call or if you want to easily involve more than two people. in a quick messaging session. Some commands, like wall, allow you to broadcast a message, but are not interactive. Other commands, such as talk, allow for longer, multi-user discussions. It makes it possible to avoid the conference call, especially if the object is limited to a fairly rapid exchange of information.

About Post Author

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Microsoft Urgently Fixes The Flaw In Smbv3 Previous post Microsoft urgently fixes the flaw in SMBv3
Rackspace Returns To The Stock Market And Raises $700m Next post Rackspace returns to the stock market and raises $700M