如何在Ubuntu中configurationlogin消息?

每次我SSH到我的AWS Ubuntu服务器,我看到一个系统信息消息,显示负载,内存使用情况和可用的安装包,如下所示:

Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-51-virtual x86_64) * Documentation: https://help.ubuntu.com/ System information as of Sun Nov 10 18:06:43 EST 2013 System load: 0.08 Processes: 127 Usage of /: 4.9% of 98.43GB Users logged in: 1 Memory usage: 69% IP address for eth0: 10.236.136.233 Swap usage: 100% Graph this data and manage this system at https://landscape.canonical.com/ 13 packages can be updated. 0 updates are security updates. Get cloud support with Ubuntu Advantage Cloud Guest http://www.ubuntu.com/business/services/cloud Use Juju to deploy your cloud instances and workloads. https://juju.ubuntu.com/#cloud-precise *** /dev/xvda1 will be checked for errors at next reboot *** *** System restart required *** 

我的问题是,这条消息是如何创build的? 我如何configuration它?

这个login消息是由Ubuntu的landscape包创build的。 我个人认为,他们很烦人,所以configuration好了可以将这些软件包加载并设置一个空白的login信息。

要做到这一点:

 $ apt-get remove landscape-client landscape-common $ rm -f /etc/motd && touch /etc/motd 

这将创build一个空白的/etc/motd 。 要设置自定义login消息,请根据需要编辑该文件。

在我的情况下,我必须清除/etc/update-motd.d/51-cloudguest ,内容如下:

 #!/bin/sh # # This file is written by the Ubuntu image build process, it is not # managed by a package. If you want to avoid seeing this advertisement, # then you can safely remove the file. echo "" echo " Get cloud support with Ubuntu Advantage Cloud Guest:" echo " http://www.ubuntu.com/business/services/cloud" echo "" echo " Use Juju to deploy your cloud instances and workloads:" echo " https://juju.ubuntu.com/#cloud-saucy"