關於Linux網絡通信:wall命令簡單介紹

Linux wall命令

man wall

關於Linux網絡通信:wall命令簡單介紹

DESCRIPTION

Wall sends a message to everybody logged in with their mesg(1) permission set to yes. The mes-sage can be given as an argument to wall, or it can be sent to wall's standard input. When using the standard input from a terminal, the message should be terminated with the EOF key (usually Control-D).

The length of the message is limited to 20 lines. For every invocation of wall a notification will be written to syslog, with facility LOG_USER and level LOG_INFO.

將訊息傳給每一個 mesg 設定為 yes 的上線使用者。

當使用終端機介面做為標準傳入時, 訊息結束時需加上 EOF (通常用 Ctrl+D)。

消息的長度限制為20行。對於每次調用wall,都會將通知寫入syslog,其中包含設施LOG_USER和級別LOG_INFO。

使用權限:

所有使用者

語法:

wall [ message ]

補充:

tty:查看當前終端

w:查看登錄的用戶

echo "message" > /dev/終端

例如:

echo "hello,queen.Iam root" > /dev/pts/2

wall命令圖解:

關於Linux網絡通信:wall命令簡單介紹

案例:

登錄root、odysee、queen

Root用戶

wall

hi I am root

Ctrl + D

關於Linux網絡通信:wall命令簡單介紹

Odysee用戶

關於Linux網絡通信:wall命令簡單介紹

Queen用戶

關於Linux網絡通信:wall命令簡單介紹

案例2:

將信息發給指定終端的用戶

我們使用root發消息給queen

獲取queen用戶的tty

tty

關於Linux網絡通信:wall命令簡單介紹

echo "hello,queen.Iam root" > /dev/pts/2

關於Linux網絡通信:wall命令簡單介紹

查看

關於Linux網絡通信:wall命令簡單介紹

測試完成

歡迎大家給予寶貴的意見或者建議。

歡迎大家補充或者共享一些其他的方法。

感謝支持。


分享到:


相關文章: