Created
October 18, 2023 02:25
-
-
Save ppsilv/e592a9fc1647aceb2577f66795a59977 to your computer and use it in GitHub Desktop.
Another way to have a colored motd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Create the the following file | |
| sudo vim /etc/update-motd.d/10-uname | |
| Content of this file. | |
| #!/bin/sh | |
| export TERM=xterm-256color | |
| read one five fifteen rest < /proc/loadavg | |
| echo "$(tput setaf 2) | |
| Kernel: `uname -v | awk -v OFS=' ' '{print $4, $5}'` | |
| $(tput setaf 4)Load Averages......: ${one}, ${five}, ${fifteen} (1, 5, 15 min) | |
| $(tput setaf 5) | |
| ______________ | |
| < Hello World! > | |
| -------------- | |
| \\ ^__^ | |
| \\ (oo)\\_______ | |
| (__)\\ )\\\/\\ | |
| ||----w | | |
| || || | |
| $(tput sgr0)" | |
| sudo chmod +x /etc/update-motd.d/10-uname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment