When we use the "who" or "w" command on a Linux terminal, we will always see a long list of users. At this time, do you really want to send a message to him/her. If she is a long-time-honored MM, and you see her, she is also shy. Do you want to send a message to her and say "hello, you are also there ".
Hey hey, are you looking forward to it? Let's introduce several commands to let you send them to her or him.
Write: send messages to other users in the system.
Usage:
Write + User Name
Write + username @ terminal number
End input: ctrl + d
Example:
Write Jack sends a message to Jack. If Jack is not online, a message is returned.
Hello, Jack enters the content to be sent
Ctrl + d stop sending and exit
Write Jack @ pts/1 sends a message to Jack. If Jack is not online, a prompt is returned.
Hello, enter the content to be sent.
Ctrl + d stop sending and exit
PS:
How can I view the terminal number?
Enter "w ". Then, check the "tty" option.
Wall: send messages to all login users of the system.
Usage:
Wall + what you want to say
Example:
Wall I love you
Talk: communicate with online users
Usage:
Talk + User Name
Talk + username @ terminal number
Example:
Talk Jack sends a message to Jack. If Jack is not online, a message is returned.
Hello, Jack enters the content to be sent
Ctrl + c stop sending and exit
Talk Jack @ pts/1 sends a message to Jack. If Jack is not online, a prompt is returned.
Hello, enter the content to be sent.
Ctrl + c stop sending and exit
PS:
Actually, it is similar to write. Are they very similar ~
How can I view the terminal number?
Enter "w ". Then, check the "tty" option.
Mesg: used to control whether a user can send messages (that is, whether the message can be sent using the write command). Of course, the root user is not limited by this restriction.
Usage:
Mesg + y allows users to send messages
Mesg + n does not allow users to send messages
PS:
I logged on to a remote Linux System Using ssh, but it didn't work !!