If you are interested in making something like the above, follow these steps.

Use an online ascii art generator to create your desired art and copy all of the characters to the clipboard. Create a file and paste in the characters copied above and save the file.

Now run the following command and replace filename with the name of the file you created in the previous step. This will generate your login script.

echo '#!/bin/bash'; while IFS= read -r line; do echo "echo '$line'"; done < filename > mymotd.sh

Now copy mymotd.sh to /etc/profile.d and make it executable.

sudo cp mymotd.sh /etc/profile.d/ && chmod +x /etc/profile.d/mymotd.sh

Now when you log in, you will see the banner in your terminal. You can modify this file anyway you like.

Using neofetch To Create a Custom Login Banner

The neofetch utility is a command line tool that displays the distribution logo and system information for whatever system it is installed on. You can use this as a neat way to create a custom login banner.

neofetch ran on Fedora 30 showing system information

Installing neofetch Utility

You can install neofetch easily with most package managers.

To install neofetch on Fedora:

$ sudo dnf install neofetch

To install neofetch on Ubuntu:

sudo apt-get install neofetch

Using neofetch

Although neofetch has a ton of options, you only need to invoke it without any arguments to get a nice looking ascii logo and some system information (as seen above).

$ neofetch

To use neofetch as your login banner simply run the following command to create a script that runs at login.

sudo bash -c $'echo "neofetch" >> /etc/profile.d/mymotd.sh && chmod +x /etc/profile.d/mymotd.sh'

The Ubuntu/Debian Specify Method

Ubuntu and Debian users can use a method that is specific to these distributions. Ubuntu uses scripts in the /etc/update-motd.d directory to show you information when you login by default. Here is a screenshot from a fresh Ubuntu 18 install.

Screenshot of default Ubuntu motd showing system information

You can edit or add a file to the /etc/update-motd.d folder to run different scripts. To create a custom login banner or motd you can simply use the techniques above and place your scripts here. Each script starts with a double digit number that determines the run order. For example 00 runs first, 99 runs last.

root@UbunutDev:/etc/update-motd.d# ls -l
 total 44
 -rwxr-xr-x 1 root root 1220 Apr  9  2018 00-header
 -rwxr-xr-x 1 root root 1157 Apr  9  2018 10-help-text
 -rwxr-xr-x 1 root root 4264 Aug 20  2018 50-motd-news
 -rwxr-xr-x 1 root root  604 Mar 21  2018 80-esm
 -rwxr-xr-x 1 root root 3017 Mar 21  2018 80-livepatch
 -rwxr-xr-x 1 root root   97 Jun 27  2018 90-updates-available
 -rwxr-xr-x 1 root root  299 May 18  2017 91-release-upgrade
 -rwxr-xr-x 1 root root  129 Jun 27  2018 95-hwe-eol
 -rwxr-xr-x 1 root root  142 Jun 27  2018 98-fsck-at-reboot
 -rwxr-xr-x 1 root root  144 Jun 27  2018 98-reboot-required


Creating a custom login banner or motd is a lot of fun and looks pretty cool. You can also use it the old fashioned way to show users important information they need to know. Bob the Unix admin used the motd to tell people when the system would be down for maintenance or to scold users who did something he didn't approve of.

I hope I covered everything in this article. If you have any questions or comments you can leave them below. Have fun!

Resources and Links