当我们启动一个 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.
我想隐藏该消息。我需要编辑哪个文件才能完成此操作?
最后两段存储在
/etc/motd
; 您只需重命名或删除它即可摆脱它们:第一行在
/etc/update-motd.d/10-uname
; 您也可以将其删除,或将其移动到另一个目录(使其隐藏不起作用)。这是 Motd(每日消息)服务。在 Ubuntu 中,您可以禁用它
我对 Debian 没有太多经验,但我敢打赌它是相同或非常相似的。