motd-manager is installed from the motd-manager.sh Bash script and is a utility for managing a clean, colored dynamic MOTD (Message of the Day) on Raspberry Pi or Debian-based systems. It replaces the default kernel banner and legal boilerplate with a concise, informative, and visually distinct MOTD that includes host information, OS version, uptime, network details, and board type (if running on a Raspberry Pi).
The URL below is intentionally commit-free and always retrieves the current gist. The recommended process provides an inspection checkpoint before running it as root:
curl -fL --proto '=https' --tlsv1.2 -o motd-manager.sh \
https://gist.githubusercontent.com/lbussy/3be88f4d10de41f110adf9e2cf54c9f2/raw/motd-manager.sh
less motd-manager.sh
sudo install -m 0755 motd-manager.sh /usr/local/sbin/motd-manager
sudo /usr/local/sbin/motd-manager installThe one-line form skips that inspection checkpoint:
curl -fsSL --proto '=https' --tlsv1.2 https://gist.githubusercontent.com/lbussy/3be88f4d10de41f110adf9e2cf54c9f2/raw/motd-manager.sh | sudo bash -s -- install-
Displays system summary with colorized output:
- Hostname
- Fully qualified domain name (or {hostname}.local)
- IP address
- OS release name and version
- CPU architecture
- Uptime (pretty format)
- Primary network interface and IP address
- Detected Raspberry Pi board model (if applicable)
-
Creates a persistent
/etc/update-motd.d/90-motd-managerscript. -
Disables default MOTD snippets (kernel banner and Debian legal text).
-
Supports restoring the default MOTD configuration.
-
Compatible with both SSH and local console logins.
Save the file to /usr/local/sbin/motd-manager:
sudo tee /usr/local/sbin/motd-manager >/dev/null <<'EOF'
# (paste the full script contents here)
EOFMake it executable:
sudo chmod +x /usr/local/sbin/motd-managerRun the installer to create the colorized MOTD and disable the defaults:
sudo /usr/local/sbin/motd-manager installThis will:
- Create
/etc/update-motd.d/90-motd-manager. - Disable
/etc/update-motd.d/10-uname(kernel banner). - Rename
/etc/motdto/var/lib/motd-manager/motd(hiding the legal text).
/usr/local/sbin/motd-manager show\033[1;33mHost:\033[0m wspr4
\033[1;33mSystem:\033[0m Debian GNU/Linux 12 (bookworm) (\033[1;36maarch64\033[0m)
\033[1;33mBoard:\033[0m Raspberry Pi 4 Model B Rev 1.5
\033[1;32mUptime:\033[0m 5 days, 17 hours, 52 minutes
\033[1;36mAddress:\033[0m 192.168.1.64 on wlan1
sudo /usr/local/sbin/motd-manager installThis sets up the clean MOTD and removes redundant information.
The command reports the installed snippet path on success.
sudo /usr/local/sbin/motd-manager restoreThis restores the original Debian MOTD behavior:
- Re-enables
/etc/update-motd.d/10-unameonly if this tool disabled it. - Restores
/etc/motdfrom/var/lib/motd-manager/motdif available.
The command reports successful restoration on success.
If the system exposes /proc/device-tree/model, its contents are printed as the board model line. This includes variants like:
- Raspberry Pi 4 Model B Rev 1.5
- Raspberry Pi Zero 2 W Rev 1.0
Color is always enabled for consistent SSH and console display. ANSI escape sequences are used:
- Yellow (
\033[1;33m) – host and system name - Cyan (
\033[1;36m) – architecture and IP address - Green (
\033[1;32m) – uptime
- All file changes require root privileges (via
sudo). - Managed-file markers prevent overwriting or deleting an unrelated snippet. Saved state makes restore change only settings changed by this tool.
set -euo pipefailcatches many errors, but does not make multi-file changes atomic.
- Install as
/usr/local/sbin/motd-manager; it does not need a.shsuffix. - Use
90-motd-manager, not the ambiguous90-release. - Keep state in
/var/lib/motd-manager, not collision-prone/etc/motd.static. - This document is
MOTD Manager Documentation.md, matching its H1 so the gist page uses the README title.
If an older revision is installed, restore it before installing this revision. The new script deliberately does not guess whether existing legacy files belong to it.
| File | Purpose |
|---|---|
/etc/update-motd.d/90-motd-manager |
Custom MOTD snippet with system summary |
/etc/update-motd.d/10-uname |
Disabled only if initially executable |
/etc/motd → /var/lib/motd-manager/motd |
Legal text backup |
This script is released under the MIT License. You are free to use, modify, and distribute it with attribution.
| Version | Date | Notes |
|---|---|---|
| 1.1 | Aug 2026 | Conservative restore state and descriptive filenames |
| 1.0 | Nov 2025 | Initial release with Pi board detection and colored MOTD support |