如何在 tty1 控制台登录时停止显示“保修”通知

如何在 tty1 控制台登录时停止显示“保修”通知

该消息显示了 ubuntu 显示的有关担保和帮助建议的信息。

我唯一想看到的是更新的版本和状态。

实际上,如果有人能告诉我如何创建自己的消息来显示,那就太好了。

答案1

您要查找的文本位于里面

/etc/legal

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

在您开始编辑之前:据我所知,每个用户登录时都会显示一次。当有一个文件

~/.cache/motd.legal-displayed

它不会显示。所以只要创建它,它就会消失。最简单的方法是执行此命令:

touch ~/.cache/motd.legal-displayed

如果你想添加自己的消息,你可以添加一个文件到

/etc/update-motd/

目前它将举办:

00-header     90-updates-available  98-fsck-at-reboot
10-help-text  91-release-upgrade    98-reboot-required

文件名按字母顺序执行,并且它们的名称说明了它所显示的内容。00-header 是“欢迎...”文本。10-help-text 显示 Ubuntu 文档等的 URL。

相关内容