Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Linux command line to communicate with other users

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use the Linux command line to communicate with other users, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.

Wall

The wall (short for "Write ALL") command allows you to send a message to all logged-in users on your system. Here we assume that users all use the command line to work on the same server. Although the wall command is most often used by system administrators to make announcements and communicate information to users (for example, the server is about to be shut down for maintenance), it can be used by any user.

The system administrator may send information in a way similar to the following:

$wall The system will be going down in 15 minutes to address a serious problem

And all logged-in users will see messages like this:

Broadcast message from admin@dragonfly (pts/0) (Thu Mar 5 08:56:42 2020): The system is going down in 15 minutes to address a serious problem

If you want to use single quotation marks in a message, you can enclose the message in double quotes like this:

$wall "Don't forget to save your work before logging off"

The outermost double quotes will not appear in the outgoing message, but without them, wall will stop and wait for a paired single quote to be entered.

Mesg

If for some reason you don't want to receive messages from another user, you can use the mesg command to block those messages. This command can accept an n as an argument to reject a user's message, or a y as a parameter to receive a message from the user.

$mesg n doug$ mesg y doug

Blocked users will not be informed of this fact. You can also use mesg to block or receive all messages like this:

$mesg y $mesg nwrite

Another command to send text without using e-mail is write, which can be used to communicate with a specific user.

$write nemoAre you still at your desk?I need to talk with you right away.C

Enter your information and exit with ctrl-c, which completes the communication. This command allows you to send text, but does not create a two-way call. It just sends the text over. If the target user logs in on multiple terminals, you can specify which terminal you want to send the message to, otherwise the system will choose the terminal with the shortest idle time.

$write nemo#1

If you try to send a message to a user who has blocked the message, you should see output like this:

$write nemowrite: nemo has messages disabledtalk/ytalk

The talk and ytalk commands allow you to chat interactively with one or more users. They display an interface with two child windows up and down, with each user entering content into the window displayed at the top of their screen and seeing a reply in the window below. To reply to a talk request, the receiver can enter talk, followed by the user name of the requestor.

Message from Talk_Daemon@dragonfly at 10:10... talk: connection requested by dory@127.0.0.1.talk: respond with: talk dory@127.0.0.1$ talk dory

If you are using ytalk, the window can contain more than two participants. As the following example shows (this is the result of the above talk dory command), talk usually points to ytalk.

-- = YTalk version 3.3.0 =-- Is the report ready?-- = nemo@dragonfly =- -Just finished it

As mentioned above, on the other side of the call, the window of the talk session interface is the opposite:

-- = YTalk version 3.3.0 =-- Just finished it-- = dory@dragonfly =- -Is the report ready?

Again, use ctrl-c to exit.

If you want to communicate with non-native users, you need to add the-h option and the target hostname or IP address, like this:

$talk-h 192.168.0.11 nemo Thank you for reading this article carefully. I hope the article "how to use the Linux command line to communicate with other users" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report