【讨论】如何实现Ubuntu9.10这种banner功能

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
头像
Prince
帖子: 24
注册时间: 2006-03-16 9:54

【讨论】如何实现Ubuntu9.10这种banner功能

#1

帖子 Prince » 2010-07-28 11:25

今天登录了一台Ubuntu 9.10的服务器,登录成功即出现如下提示

代码: 全选

Linux ubuntu 2.6.31-14-generic-pae #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009 i686

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

System information as of Wed Jul 28 19:03:57 CST 2010

System load: 0.0 Memory usage: 11% Processes: 67
Usage of /: 4.8% of 18.82GB Swap usage: 0% Users logged in: 1

Graph this data and manage this system at https://landscape.canonical.com/
Last login: Wed Jul 28 19:00:48 2010
这样的功能,可以一目了然了解到系统的当前状态,很实用。能移植到其他Linux系统吗?
我在/etc/profile,/etc/bash.bashrc,~/.bashrc都找过了,没发现相应的实现代码。
头像
壹哥
帖子: 199
注册时间: 2008-01-02 17:26

Re: 【讨论】如何实现Ubuntu9.10这种banner功能

#2

帖子 壹哥 » 2010-07-28 13:09

/etc/motd
哥每天阅贴无数,心已经麻木了!
哥回的不是贴,是寂寞!
头像
Prince
帖子: 24
注册时间: 2006-03-16 9:54

Re: 【讨论】如何实现Ubuntu9.10这种banner功能

#3

帖子 Prince » 2010-07-28 13:31

壹哥 写了:/etc/motd
里面的内容也已经是明文,没有shell代码
应该是需要代码来获取系统信息的,比如uname -a
回复