要关闭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路径下设置通知相关选项,如关闭通知显示等。