要关闭CentOS消息通知,可根据不同通知类型采取对应方法:
mesg -n
命令可禁止接收其他用户的write
消息。/etc/rsyslog.conf
文件,将日志级别调高(如将.info
改为.warn
或.err
),然后重启rsyslog
服务sudo systemctl restart rsyslog
。mailx
,可编辑/etc/mail.rc
文件,注释掉或删除相关邮件发送配置;若使用其他邮件服务,需根据其配置文件进行相应修改。dconf-editor
工具,在org - gnome - desktop - notifications
路径下设置通知相关选项,如关闭通知显示等。