[转]ubuntu ssh登陆显示系统信息
- Welcome to Ubuntu 14.04. LTS (GNU/Linux 3.13.--generic i686)
- * Documentation: https://help.ubuntu.com/
- System information as of Fri May :: PDT
- System load: 0.98 Processes:
- Usage of /: 6.8% of .11GB Users logged in:
- Memory usage: % IP address for eth0: 192.168.78.248
- Swap usage: %
- Graph this data and manage this system at:
- https://landscape.canonical.com/
- You have new mail.
- Last login: Fri May :: from 192.168.78.212
显示登录的时间,显示当前进程数,IP,内存,硬盘等一些使用情况。不错的功能,还能知道上次登录的时间以及IP。但是到新的VPS上,发现只有显示:
- Welcome to Ubuntu 14.04. LTS (GNU/Linux 3.13.--generic i686)
- * Documentation: https://help.ubuntu.com/
原来是没有安装landscape.通过以下命令安装:
- sudo apt-get install landscape-common
这里插入一个介绍一下landscape
这是:https://landscape.canonical.com/index.html landscape的官方网站
之后退出,并重新登录。即可达到显示登录系统信息的功能了。
其实这是ubuntu开机后,会生成一个文件:/run/motd.dynamic 而在登录后,会去cat该文件并显示出来。而这个文件的生成其实是执行了/etc/update-motd.d/ 内的几个文件。看一下有安装landscape后 /etc/update-motd.d/的内容:
- -rwxr-xr-x root root 2月 -header
- -rwxr-xr-x root root 2月 -help-text
- lrwxrwxrwx root root 5月 : -landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper
- -rwxr-xr-x root root 8月 -updates-available
- -rwxr-xr-x root root 4月 -release-upgrade
- -rwxr-xr-x root root 8月 -fsck-at-reboot
- -rwxr-xr-x root root 8月 -reboot-required
顺序执行了这几个文件。并将结果输出到/run/motd.dynamic
但是看我虚拟机上的ubuntu server版本的话,并没有90-updates-available 98-fsck-at-reboot 98-reboot-required 这三个文件。那这三个文件又是什么?这三其实有个功能,可以显示当前系统有多少包可以升级,有多少是安全更新等。这对于我这种有升级控的人很是需要。可以通过一下命令安装:
- sudo apt-get install update-notifier-common
安装完成之后 登陆会提示以下信息
- packages can be updated.
- updates are security updates.
最后重新登陆 得到完整的登陆信息
- Welcome to Ubuntu 14.04. LTS (GNU/Linux 3.13.--generic i686)
- * Documentation: https://help.ubuntu.com/
- System information as of Fri May :: PDT
- System load: 0.66 Processes:
- Usage of /: 6.8% of .11GB Users logged in:
- Memory usage: % IP address for eth0: 192.168.78.248
- Swap usage: %
- Graph this data and manage this system at:
- https://landscape.canonical.com/
- packages can be updated.
- updates are security updates.
- You have new mail.
- Last login: Fri May :: from 192.168.78.212
- root@ubuntu:~#
此文部分修改
转载自:http://elkpi.com/topics/ubuntu-ssh-login-show-system-info.html
thanks elkpi 带来此好文
[转]ubuntu ssh登陆显示系统信息的更多相关文章
- [转载] SSH入门学习基础教程
在Linux系统中,OpenSSH是目前最流行的远程系统登录与文件传输应用,也是传统Telenet.FTP和R系列等网络应用的换代产品.其 中,ssh(Secure Shell)可以替代telnet. ...
- [转]ubuntu中查找软件的安装位置
原博客地址:http://www.cnblogs.com/zhuyatao/p/4060559.html ubuntu中的软件可通过图形界面的软件中心安装,也可以通过命令行apt-get instal ...
- [转]Ubuntu Tweak 0.8.7 发布:支持 Ubuntu 14.04
原文网址:http://www.oschina.net/news/51054/ubuntu-tweak-0-8-7 这是我开发 Ubuntu Tweak 七年以来第一次没在 Ubuntu 正式发布之前 ...
- Ubuntu SSH登陆出现Access Denied错误
在/etc/ssh/sshd_config 中有个 PermitRootLogin, 改成“PermitRootLogin yes”就可以了 重启ssh: /etc/init.d/ssh restar ...
- [转]ubuntu 14.04 如何开启和关闭触控板
转自:http://lxn348567248.blog.163.com/blog/static/1201759252014649443513/ 禁用触摸板的命令: sudo rmmod psmous ...
- [转]Ubuntu Linux 安装 .7z 解压和压缩文件
原文网址:http://blog.csdn.net/zqlovlg/article/details/8033456 安装方法: sudo apt-get install p7zip-full 解压文件 ...
- linux系统新建用户ssh远程登陆显示-bash-4.1$解决方法
linux系统新建的用户用ssh远程登陆显示-bash-4.1$,不显示用户名路径 网络上好多解决办法,大多是新建.bash_profile文件然后输入XXXXX....然而并没有什么用没有用.... ...
- Ubuntu Server 14.04 下root无法ssh登陆
今天安装了Ubuntu Server 14.04 在终端配置了root密码后,使用SecureCRT和putty竟然不能ssh登陆,SecureCRT一直提示密码不对,但是可以肯定输入的密码100 ...
- Mac ssh登陆linux并且显示linux图形
背景: Mac 通过[终端]ssh登陆linux并且在Mac显示linux图形 Mac 主机IP: 10.2.1.1 linux 主机IP: 192.168.1.1 说明: 想要ssh访问并且显示li ...
随机推荐
- 分布式爬虫之elasticsearch基础6(bluk)
上篇文章介绍了在es里面批量读取数据的方法mget,本篇我们来看下关于批量写入的方法bulk. bulk api可以在单个请求中一次执行多个索引或者删除操作,使用这种方式可以极大的提升索引性能. bu ...
- <计算机网络>计算机网络和应用层
1.端系统通过通信链路和分组交换机连接在一起,构成网络.网络和网络之间通过路由器相连,组成了因特网. 2.ISP(Internet Service Provider)因特网服务提供商.端系统通过ISP ...
- BMP280 driver对接单片机I2C或者SPI总线接口
1:登录github网站搜BMP280,找到 BoschSensortec/BMP280_driver 2:gitclone或者download zip都可以,把驱动下载到本地,记得fork哦! 3: ...
- JavaScript设计模式 - 状态模式
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 如何扩展32位EXE程序的使用内存
1 运行Visual studio的命令行,执行下面命令:editbin /LARGEADDRESSAWARE “C:\Program Files\Skyline\TerraExplorer Pro\ ...
- CF797F Mice and Holes 贪心、栈维护DP
传送门 首先\(\sum c\)有些大,考虑将其缩小降低难度 考虑一个贪心:第一次所有老鼠都进入其左边第一个容量未满的洞(如果左边没有就进入右边第一个未满的洞),第二次所有老鼠都进入其右边第一个容量未 ...
- NOIP2002-2017提高组题解
给个人认为比较难的题目打上'*' NOIP2002(clear) //一个很吼的贪心题,将平均数减掉之后从左往右将影响消除 #include<bits/stdc++.h> using na ...
- angularjs自定义指令Directive
今天学习angularjs自定义指令Directive.Directive是一个非常棒的功能.可以实现我们自义的的功能方法. 下面的例子是演示用户在文本框输入的帐号是否为管理员的帐号"Adm ...
- Luogu P3327 [SDOI2015]约数个数和
又是恶心的莫比乌斯反演,蒟蒻我又是一脸懵逼的被CXR dalao狂虐. 题目要求\(ans=\sum_{i=1}^n \sum_{j=1}^m d(ij)\),其中\(d(ij)\)表示数\(x\)的 ...
- Ubuntu 打包后安装提示:子进程 已安装 pre-removal 脚本 返回了错误号 1
子进程 已安装 pre-removal 脚本 返回了错误号 1或2 与 子进程 已安装 post-installation 脚本 返回了错误号 1或2 一.子进程 已安装 pre-removal ...