Latest web development tutorials

Linux mesg命令

Linux 命令大全 Linux命令大全

Linux mesg命令用於設置終端機的寫入權限。

將mesg設置y時,其他用戶可利用write指令將信息直接顯示在您的屏幕上。

語法

mesg [ny]

參數 :

  • n 不允許氣筒用戶將信息直接顯示在你的屏幕上。
  • y 允許氣筒用戶將信息直接顯示在你的屏幕上。

實例

允許其他用戶發信息到當前終端。

root 的終端

# mesg y //在这个终端设置允许发送消息

其他普通用戶的終端:

$ write root pts/4 
hello
hello
EOF //Ctrl+D 结束输入

root 的終端終端顯示

# 
Message from [email protected] (as hnlinux) on pts/5 at 14:48 ...
hello
EOF

Linux 命令大全 Linux命令大全