![如何隐藏/禁用预先提示消息?](https://linux22.com/image/159710/%E5%A6%82%E4%BD%95%E9%9A%90%E8%97%8F%2F%E7%A6%81%E7%94%A8%E9%A2%84%E5%85%88%E6%8F%90%E7%A4%BA%E6%B6%88%E6%81%AF%EF%BC%9F.png)
当我们启动 GNU/linux 系统时,它会在标准输出上显示大量消息。然后,在提示之前,它会显示如下内容:
Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
我想隐藏该消息。我需要编辑哪个文件才能完成此操作?
答案1
最后两段存储在/etc/motd
;您只需重命名或删除它即可摆脱它们:
$ cd /etc
$ sudo mv motd motd.old
第一行在/etc/update-motd.d/10-uname
;中指定。您也可以删除它,或将其移动到另一个目录(使其隐藏不起作用)。
答案2
这是 Motd(每日消息)服务。在 Ubuntu 中你可以禁用它
systemctl stop motd-news.timer
systemctl disable motd-news.timer
我对 Debian 没有太多的经验,但我敢打赌它是相同或非常相似的。