I spend a lot of time ssh-ing into workstations, and I always found the default login banner to be functional albeit a bit bland. This, coupled with how many fastfetch/neofetch posts I see on reddit, I decided to implement it on my own home workstation. This adds a bit of visual flair as well as useful system stats to the login prompt.
I originally wanted to use neofetch but it has been archived and is no longer maintained. fastfetch, on the other hand, is almost a drop-in replacement and is actively maintained, so I decided to use that instead.
The Default Login Banner
I use a Pop!_OS 22.04 setup on my workstation, and the default login banner looks like this:
$ ssh prometheus
Welcome to Pop!_OS 22.04 LTS (GNU/Linux 6.12.10-76061203-generic x86_64)
* Homepage: https://pop.system76.com
* Support: https://support.system76.com
Last login: Mon Sep 15 16:30:50 2025 from xxx.xxx.xxx.xxx
$
This is not the prettiest banner, but it gets the job done. But we can do better.
Understanding the MOTD
The MOTD, or the Message of the Day, controls what’s displayed when a user logs in. It can be a simple text file, or a script that generates dynamic content, or many of these scripts combined. The login message is controlled by scripts located in /etc/update-motd.d/. These scripts are executed in numerical order and their output is combined to form the final MOTD. If I list the contents of this directory, I get:
$ cd /etc/update-motd.d
$ ls -lart
total 32
-rwxr-xr-x 1 root root 1220 Oct 15 2021 00-header
-rwxr-xr-x 1 root root 84 Jan 11 2023 85-fwupd
lrwxrwxrwx 1 root root 36 Jul 27 2023 10-help-text -> ../pop-os/update-motd.d/10-help-text
lrwxrwxrwx 1 root root 36 Jul 27 2023 50-motd-news -> ../pop-os/update-motd.d/50-motd-news
-rwxr-xr-x 1 root root 296 Jun 17 2024 91-contract-ua-esm-status
drwxr-xr-x 1 root root 216 May 4 16:22 .
drwxr-xr-x 1 root root 4844 Sep 14 02:04 ..
Scripts being executed in numerical order means that the lowest number (00) will be executed first, and so on. For example:
00-headeris executed first. It contains the script that prints theWelcome to Pop!_OS ...message.
Contents of `00-header`
$ cat 00-header
#!/bin/sh
#
# 00-header - create the header of the MOTD
# Copyright (C) 2009-2010 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
[ -r /etc/lsb-release ] && . /etc/lsb-release
if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
# Fall back to using the very slow lsb_release utility
DISTRIB_DESCRIPTION=$(lsb_release -s -d)
fi
printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
10-help-textis executed next. It contains the script that prints the* Homepage ...and* Support ...messages.
Contents of `10-help-text`
$ cat 10-help-text
#!/bin/sh
echo
echo " * Homepage: https://pop.system76.com"
echo " * Support: https://support.system76.com"
echo
I want my neofetch output to be loaded after the Welcome to Pop!_OS ... message, but before the Last login: ... message. The latter is not a part of the MOTD however. This means that my neofetch script should have a numerical prefix of 11 or higher.
The Setup
I created a script called 11-neofetch in the same directory so that it is executed as part of the MOTD.
Step 1: Create the script
$ sudo nano /etc/update-motd.d/11-neofetch
Step 2: Add the content to the script
I added a simple one liner that checks if neofetch is installed and runs it if it is.
#!/bin/bash
command -v neofetch >/dev/null 2>&1 && neofetch
Step 3: Make the script executable
MOTD scripts need to be executable, so let’s do that with chmod:
$ sudo chmod +x /etc/update-motd.d/11-neofetch
Step 4: Test the MOTD
A nice thing about MOTD is that I don’t need to log out and then log in to test this change. I can trigger the MOTD generation manually simply using run-parts:
$ run-parts /etc/update-motd.d/
Output
Now, whenever I log in, I get a clean summary of my system info and stats:
$ ssh prometheus
Welcome to Pop!_OS 22.04 LTS (GNU/Linux ... x86_64)
* Homepage: https://pop.system76.com
* Support: https://support.system76.com
///////////// root@prometheus
///////////////////// ---------------
///////*767//////////////// OS: Pop!_OS 22.04 LTS x86_64
//////7676767676*////////////// Host: ...
/////76767//7676767////////////// Kernel: ...
/////767676///*76767/////////////// Uptime: ...
///////767676///76767.///7676*/////// Packages: ...
/////////767676//76767///767676//////// Shell: ...
//////////76767676767////76767///////// Resolution: ...
///////////76767676//////7676////////// Terminal: ...
////////////,7676,///////767/////////// CPU: ...
/////////////*7676///////76//////////// GPU: ...
///////////////7676//////////////////// Memory: ...
///////////////7676///767////////////
//////////////////////'////////////
//////.7676767676767676767,//////
/////767676767676767676767/////
///////////////////////////
/////////////////////
/////////////
Last login: Mon Sep 15 16:31:33 2025 from xxx.xxx.xxx.xxx