A self-contained, colorful Message of the Day for Raspberry Pi OS and Debian servers.
MOTD-Plus replaces the plain login banner with a boxed, at-a-glance system dashboard: uptime, load, memory and swap, CPU temperature, disk usage, OS and kernel info, pending updates, and your own access/security notices. It is a self-contained Bash script with no dependencies beyond the standard Linux userland, and it renders in the dynamic MOTD shown on every SSH or console login.
╔═══════════════════════════════════════════════════════════════════╗
║ WELCOME TO RPI-NODE1 SERVER ║
╠═══════════════════════════════════════════════════════════════════╣
║ -- SYSTEM STATUS ------------------------------------------------ ║
║ DATE : 07/12/2026 11:52:05 AM CEST ║
║ UPTIME : 7 day(s) 2 hour(s) 1 minute(s) 20 second(s) ║
║ LOAD AVG : 1m: 14.5%, 5m: 19.2%, 15m: 22.2% (across 4 core(s)) ║
║ CPU TEMP : 54.3°C ║
║ MEMORY : [▪▪▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫] 12% (0.9G / 7.9G) ║
║ SWAP : [▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫] 0% (0.0G / 0.5G) ║
╠═══════════════════════════════════════════════════════════════════╣
║ -- SYSTEM INFO -------------------------------------------------- ║
║ OS : Debian GNU/Linux 12 (bookworm) ║
║ KERNEL : 6.12.93+rpt-rpi-2712 ║
║ UPDATES : 20 package(s) can be updated ║
╠═══════════════════════════════════════════════════════════════════╣
║ -- DISK USAGE --------------------------------------------------- ║
║ DISK / : [▪▪▪▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫] 15% (7.8G / 58.0G) ║
║ DISK /nvme : [▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫] 1% (0.0G / 457.4G) ║
║ DISK /boot/firmware : [▪▪▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫▫] 12% (0.1G / 0.5G) ║
╠═══════════════════════════════════════════════════════════════════╣
║ -- NOTICE ------------------------------------------------------- ║
║ ACCESS : Authorized access only. All activity is monitored. ║
║ SECURITY : Maintain operational integrity and accountability. ║
╚═══════════════════════════════════════════════════════════════════╝
(Colors are shown in the real terminal; disk/memory bars turn green → yellow → red as usage crosses the 70% and 85% thresholds.)
- Boxed dashboard — A single auto-sized Unicode box, grouped into System Status, System Info, Disk Usage, and Notice sections. The box width adapts to the longest line, and padding stays correct even with embedded ANSI color codes.
- Live system status — Local date/time, uptime, and load averages (1/5/15 minute) shown as a percentage of total CPU capacity.
- Memory and swap — Usage bars with used/total in GiB. Swap is shown only when swap is actually configured.
- CPU temperature — Uses
vcgencmdon Raspberry Pi hardware, falling back to/sys/class/thermalon other boards. Omitted entirely if no sensor is available. - Disk usage — One aligned bar per device-backed filesystem, with used/total sizes.
- Color thresholds — Load, memory, swap, disk, and temperature are colored green (≤70), yellow (≤85), and red (>85) so problems stand out.
- Pending updates — Reports the number of available package updates from a small cache file (see How the update count works).
- Custom notices — Two configurable lines for access and security messaging.
- No extra dependencies — Pure Bash plus coreutils (
date,df,nproc,uname) andawk. Nothing to install, nothing to compile.
MOTD-Plus is pure Bash and reads system state straight from /proc, /sys, and /etc/os-release, so it relies only on tools that ship with the base system — on a stock Raspberry Pi OS or Debian install there is normally nothing to install. It needs:
- Raspberry Pi OS or Debian 12 (Bookworm) or later — this is the tested baseline; older releases may work but are unsupported.
- Bash 4+ — uses
${var^^}and other modern parameter expansions (Bookworm and later ship Bash 5). - coreutils —
date,df,nproc,uname,install. - An awk (
mawkis the Debian default;gawkalso works). libpam-modules— provides the dynamic-MOTD mechanism (pam_motd); installed by default.- Optional:
vcgencmd(libraspberrypi-bin, pre-installed on Raspberry Pi OS) for CPU temperature. On other boards the script falls back to/sys/class/thermal, and if neither is available the CPU temperature line is simply omitted.
All of these are part of a default Raspberry Pi OS or Debian installation. On an unusually minimal image you can make sure they are present with:
sudo apt update
sudo apt install --no-install-recommends bash coreutils mawk libpam-modulesInstalling the script and the update helper requires root (they live in /etc/update-motd.d/ and /etc/cron.hourly/). The commands below use sudo, which is preinstalled on Raspberry Pi OS. A minimal Debian install ships without sudo — there, run the same commands as the root user (drop the sudo prefix, after su -).
To fetch the repository with the Quick install you also need git:
sudo apt install gitgit is only for cloning — if you'd rather not install it, download the source archive from GitHub and use the Manual install instead.
Note: MOTD-Plus intentionally does not depend on
lsb-release(it reads/etc/os-releasedirectly) or onprocps/thehostnamepackage, so it works on minimal images without pulling in extra packages.
Both Raspberry Pi OS and Debian build the login banner through pam_motd, which runs every executable script in /etc/update-motd.d/ at login and caches the result in /run/motd.dynamic. Installing MOTD-Plus is therefore just a matter of dropping the script into that directory and making it executable — no service, no daemon.
The repo mirrors the target filesystem, so you can see exactly where each file installs:
motd-plus/
├── install.sh # installer (copies the etc/ tree into place)
├── etc/
│ ├── update-motd.d/
│ │ └── 50-motd-plus → /etc/update-motd.d/50-motd-plus (the MOTD renderer)
│ └── cron.hourly/
│ └── check-updates → /etc/cron.hourly/check-updates (update-count refresh)
├── README.md · CHANGELOG.md · LICENSE.md
The steps below are identical on Raspberry Pi OS and Debian.
git clone https://github.com/nandortoth/motd-plus.git
cd motd-plus
# Install both files and populate the update count
sudo ./install.sh
# Or also disable the stock banners so MOTD-Plus is the only one shown
sudo ./install.sh --quiet-defaultsinstall.sh copies etc/update-motd.d/50-motd-plus and etc/cron.hourly/check-updates into /etc, then runs the update-count helper once. With --quiet-defaults it also disables the other update-motd.d fragments and blanks /etc/motd. Run ./install.sh --help for details.
If you'd rather not use the installer:
# 1. The MOTD renderer (the 50- prefix controls run order; lower = earlier)
sudo install -D -m 0755 etc/update-motd.d/50-motd-plus /etc/update-motd.d/50-motd-plus
# 2. The hourly update-count helper (cron.hourly files must have NO extension)
sudo install -D -m 0755 etc/cron.hourly/check-updates /etc/cron.hourly/check-updates
sudo /etc/cron.hourly/check-updates # populate the count immediately
# 3. (Optional) quiet the stock banners so only MOTD-Plus shows
sudo chmod -x /etc/update-motd.d/* 2>/dev/null
sudo chmod +x /etc/update-motd.d/50-motd-plus
sudo truncate -s 0 /etc/motd 2>/dev/null || trueOn Raspberry Pi OS the "last login" line comes from
pam_lastlog, and the default help text and uname line come from the stock10-help-text/10-unamefragments — thechmod -xabove disables the latter two.
# Render exactly what a login will show
sudo run-parts /etc/update-motd.d/
# Or run the renderer directly
sudo /etc/update-motd.d/50-motd-plusThen open a fresh SSH session to confirm the banner appears on login.
The UPDATES line reads a plain integer from /var/cache/motd-updates.count. This is deliberately decoupled from the MOTD so that login stays instant — the banner never runs apt itself. etc/cron.hourly/check-updates refreshes that count once an hour:
apt update -qq
UPDATES_AVAILABLE=$(apt list --upgradable 2>/dev/null | grep -vc "Listing...")
echo "$UPDATES_AVAILABLE" > /var/cache/motd-updates.countUntil the file exists, the MOTD shows Update info not available — which is expected on a fresh install.
MOTD-Plus is just two scripts, so updating is a pull-and-reinstall:
cd motd-plus
git pull
sudo ./install.shRe-running install.sh overwrites the installed copies with the new versions (it uses install -D, so it replaces in place) and refreshes the update count. Pass --quiet-defaults again if you rely on it — the flag isn't remembered between runs. To update a manually installed copy, re-run the two install -D commands from Manual install.
If you customized
ACCESS_MSG,SECURITY_MSG, or the color thresholds, make those edits in your local repo copy ofetc/update-motd.d/50-motd-plusand commit orgit stashthem beforegit pull— otherwise the reinstall (or a merge conflict) will overwrite them. Editing the installed/etc/update-motd.d/50-motd-plusdirectly is not preserved across a reinstall.
The script is short and readable; the two most common tweaks are near the top of etc/update-motd.d/50-motd-plus:
- Notice lines — Edit
ACCESS_MSGandSECURITY_MSG. - Color thresholds — Adjust the
70/85boundaries in thecolorize()function. - Bar length — Change
length=20inusage_bar().
After editing, reinstall by re-running sudo ./install.sh (or the manual install command above).
sudo rm -f /etc/update-motd.d/50-motd-plus
sudo rm -f /etc/cron.hourly/check-updates
sudo rm -f /var/cache/motd-updates.count
# Optionally re-enable any default fragments you disabled with --quiet-defaults.MOTD-Plus is free software, released under the GNU General Public License v3.0 or later.
- Author: Nandor Toth
- Issues: github.com/nandortoth/motd-plus/issues