Zi 字媒體
2017-07-25T20:27:27+00:00
登入 Linux 時會執行 /etc/update-motd.d 下的腳本
所以想要觀看的話除了重新登入以外,以迴圈執行即可
for i in /etc/update-motd.d/*; do sudo $i; done
或是用 find 指令結合其 -exec 參數也可以達到相同效果
sudo find /etc/update-motd.d -type f -exec {} \;
有些版本的 Ubuntu 會自帶 landscape-sysinfo 的資訊
System load: 0.01 Processes: 186
Usage of /: 38.7% of 1.33TB Users logged in: 0
Memory usage: 20% IP address for eth0: 192.168.0.1
Swap usage: 0% IP address for tun0: 10.0.0.1
Graph this data and manage this system at:
https://landscape.canonical.com/
如果需要這些資訊,安裝 landscape-common 套件即可
sudo apt install -y landscape-common
使用前面所說的走訪/etc/update-motd.d的方式可以看到全部的資訊
僅需顯示 landscape-sysinfo 的資訊的話,直接下 landscape-sysinfo 指令即可
References:
command line – How to see the details which Ubuntu shows at the time of login anytime? – Ask Ubuntu
motd (Unix) – Wikipedia
Ubuntu Manpage: landscape-sysinfo – Display a summary of the current system status
寫了
5860316篇文章,獲得
23313次喜歡