25 ssh
我想向 ssh MOTD 添加一些字段。
今日交通部:
Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
System information as of Tue Jan 25 19:25:53 CET 2011
System load: 0.23 Processes: 139
Usage of /: 76.8% of 911.20GB Users logged in: 1
Memory usage: 17% IP address for eth0: 192.168.1.102
Swap usage: 0%
Graph this data and manage this system at https://landscape.canonical.com/
38 packages can be updated.
38 updates are security updates.
No mail.
Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.106
Run Code Online (Sandbox Code Playgroud)
我知道我可以通过将 /etc/motd 指向 /var/run/motd 以外的其他内容来将其更改为静态消息,但我不想丢失今天显示的生成的数据。
是否可以将两个额外硬盘驱动器的磁盘使用情况添加到默认生成的消息中?例如:
Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
System information as of Tue Jan 25 19:25:53 CET 2011
System load: 0.23 Processes: 139
Memory usage: 17% Users logged in: 1
Swap usage: 0% IP address for eth0: 192.168.1.102
Usage of /: 76.8% of 911.20GB
Usage of /media/hddb/: 8% of 1.8T
Usage of /media/hddc/: 16% of 1.8T
Graph this data and manage this system at https://landscape.canonical.com/
38 packages can be updated.
38 updates are security updates.
No mail.
Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.105
Run Code Online (Sandbox Code Playgroud)
Mik*_*kel 24
您需要编辑的文件位于/etc/update-motd.d.
有关其工作原理的详细信息,请参阅update-motd 手册页。
我的 Ubuntu 版本没有显示磁盘使用情况,所以我不确定您到底需要编辑哪个脚本。
小智 19
看一看关于 update-motd 应用程序设计的Ubuntu Wiki 文章。该程序包含在update-motd包中,将帮助您创建更动态的 MOTD。
| 归档时间: |
|
| 查看次数: |
67698 次 |
| 最近记录: |