How one can Customise the Linux Terminal Splash Display

The terminal is like a virtual second home for many Linux users as they spend most of their time entering commands into it. It's important to personalize the terminal to your heart's content if you don't want to get bored with the boring, black command line screen.

Linux gives you the ability to customize every facet of the terminal – its appearance, behavior, color schemes, font, and splash screen.

In this article, we're going to look at how to customize the splash screen on your Linux terminal to spice up your command line sessions.

Step 1: Finding the Shell Configuration File

The terminal emulator installed on your Linux computer acts as a front end for the underlying shell. For most Linux distributions, Bash is the default shell that comes pre-installed with the system. On Linux, if you don't like the default shell – bash in most cases – you can always change the shell with chsh.

Each shell has a configuration file that is stored in the user's home directory. For bash, the file is called .bashrc. And if you use Zsh it will be .zshrc.

In the home directory, find the configuration file that corresponds to the shell you are currently using. In this guide, we're going to show you how to customize the splash screen in Bash. Note, however, that the steps are similar for other shells as well.

To personalize the welcome screen of your terminal, first open the shell configuration file with your preferred text editor. In this case Vim:

vim ~ / .bashrc

Step 2: Adding the splash screen content

Before adding sophisticated scripts to the file, try printing a simple string first to verify that the shell is reading the configuration file correctly. To do this, append the following line to the configuration file:

echo "Welcome to the terminal!"

Now save and exit Vim and restart the terminal to see the changes.

The welcome text message is displayed each time the shell is started, generally when the terminal is restarted.

Now that you know that the configuration file is working, it's time to add some interesting information and commands to the file.

1. Display system information on the welcome screen

To spice things up, there is an attractive way to view system information at the top of a new terminal instance. You don't have to worry about extracting the system details and displaying them beautifully, several tools are already available to do the job for you. Two of the most commonly used are Neofetch and Screenfetch.

Before you can add the commands to the configuration file, install Neofetch (or Screenfetch) on your system using the standard package manager.

Then, depending on the package installed above, add one of the following commands to the end of the shell configuration file:

neofetch
Screen retrieval

Save the changes and restart the terminal.

2. Display a random message

You can use wealth to display random (sometimes funny) quotation marks when you start Terminal. Before editing the configuration file, install the wealth Package on your system.

On Ubuntu / Debian:

sudo apt install Fortune

Under Arch Linux:

Sudo Pacman -S Fortune-Mod

To install Fortune on Fedora and CentOS:

sudo dnf install Fortune-Mod

After the installation, add the following command to the end of the configuration file:

wealth

Output:

You can save assets with other utilities such as Cow white to create eye-catching splash screen prompts. Install the cowsay package on your computer and add the following line to the shell configuration file:

Fortune | Cow white

Output:

3. Display an ASCII graphic at startup

Plain text can be a major distraction for some users. Although the Linux terminal doesn't support pictures and videos, you can use ASCII graphics to add a visual touch to the screen.

You can do this by using the figlet Utility to convert plain text to ASCII art. The package is available in official distribution repositories and can be downloaded using the standard package manager.

On Debian based systems like Ubuntu:

sudo apt install figlet

To install Figlet on Arch Linux:

sudo pacman -S figlet

On Fedora / CentOS and other RPM-based distributions:

sudo dnf install figlet

After the installation, append the following statement to the shell configuration file:

figlet -cl "This is a string"

…Where "This is a string"is the text that you want to display as an ASCII graphic.

For example:

4. Add weather and date information

If you're Linux crazy and can't remember the current date and weather while working at the command line, you can configure the terminal to remind you of such details when it starts up.

To install Beckon on your system if you don't already have it. Then, to get weather details every time you start the terminal, append the following line to the configuration file:

curl wttr.in/paris?0

Make sure you "Paris"in the above command with your geographic location ? 0 tells the program to print only the current weather instead of the standard three-day forecast.

You can also print the current date and day using the Date Utility. Just add the following line to the shell configuration:

date

After adding both commands to the file, the splash screen will look something like this:

Step 3: save and review the changes

Once you've finished tweaking and editing the configuration file, it's time to permanently apply those changes by saving and exiting the file. To see the splash screen, simply restart the terminal from the application menu or use the Ctrl + Old + T instead, a keyboard shortcut.

You can also create custom scripts that output what you want to see on your Terminal splash screen. Then just add the command to run the script in the shell configuration file and you are done.

Don't be satisfied with the standard terminal display

Unlike Windows and macOS, users have complete control over the appearance and behavior of their Linux system. You can literally change any aspect of the operating system as most of the code is open source and can be changed.

However, understanding the code can be difficult if you are unfamiliar with the programming language. Therefore, Linux tinkerers who want to delve into customization and kernel development should have a good understanding of the C programming language and its concepts.

5 C programming tips you need to learn to get started

The C programming language has a bad reputation. But once you get it under control, anything can be programmed, as these tips show.

Continue reading

About the author

Deepesh Sharma
(92 articles published)

Deepesh is Junior Editor for Linux at MUO. He writes informational guides on Linux with the aim of providing a blissful experience for all newbies. I'm not sure about movies, but if you want to talk about technology, he's your type. In his spare time he can be found reading books, listening to different genres of music, or playing guitar.

More
From Deepesh Sharma

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!

Click here to subscribe

Leave a Reply

Your email address will not be published. Required fields are marked *