Skip to content

Instantly share code, notes, and snippets.

@StudioLE
Last active June 4, 2020 09:58
Show Gist options
  • Save StudioLE/1f701ef5f712658443a5ec384ff43e8a to your computer and use it in GitHub Desktop.
Save StudioLE/1f701ef5f712658443a5ec384ff43e8a to your computer and use it in GitHub Desktop.
Ubuntu Change Message of the Day (MOTD)
#!/bin/bash
# https://raymii.org/s/tutorials/Disable_dynamic_motd_and_motd_news_spam_on_Ubuntu_18.04.html
# Disable Dynamic MOTD
# Change ENABLED=1 to ENABLED=0.
sudo nano /etc/default/motd-news
# Disable a few components
sudo chmod -x /etc/update-motd.d/00-header
sudo chmod -x /etc/update-motd.d/10-help-text
sudo chmod -x /etc/update-motd.d/50-landscape-sysinfo
# Install screenfetch
sudo apt install screenfetch
# Add a new component
# Paste contents of 05-screenfetch.sh
sudo nano /etc/update-motd.d/05-screenfetch
# Enable it
sudo chmod +x /etc/update-motd.d/05-screenfetch
# Check it's all working by running
sudo run-parts /etc/update-motd.d
#!/bin/bash
echo ""
echo ""
date
echo ""
echo ""
/usr/bin/screenfetch
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment