Skip to content

Instantly share code, notes, and snippets.

@ppsilv
Created October 18, 2023 02:25
Show Gist options
  • Select an option

  • Save ppsilv/e592a9fc1647aceb2577f66795a59977 to your computer and use it in GitHub Desktop.

Select an option

Save ppsilv/e592a9fc1647aceb2577f66795a59977 to your computer and use it in GitHub Desktop.
Another way to have a colored motd
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