温馨提示×

如何开启debian message

小樊
46
2026-09-12 22:54:57
栏目: 智能运维

在 Debian 里“开启 message”通常可能指下面几种情况之一,我先分别说明,你可以对号入座:


1. 开启系统日志( messages 日志 )

Debian 默认使用 rsyslogsystemd-journald

查看 /var/log/messages

sudo apt install rsyslog
sudo systemctl enable --now rsyslog

然后查看:

tail -f /var/log/messages

(有些 Debian 版本默认不写 messages,可编辑 /etc/rsyslog.conf


2. 开启 boot / 启动信息( dmesg )

dmesg

实时查看:

dmesg -w

3. 开启 systemd 服务消息

journalctl -f

查看某服务:

journalctl -u nginx -f

4. 开启登录 / 用户消息( motd )

sudo systemctl enable --now motd

编辑:

sudo nano /etc/motd

5. 开启桌面通知( Desktop Message )

如果是 GUI:

sudo apt install libnotify-bin
notify-send "Hello"

如果你能补充说明:

  • 命令行还是桌面
  • 日志 / 弹窗 / 启动提示

我可以给你更精确的操作步骤。

0