How to Randomly Display ASCII Art on Linux Terminal

In this short article, we will show how to automatically and randomly display ASCII art, using ASCII-Art-Splash-Screen when you open a terminal window.

ASCII-Art-Splash-Screen is a utility that comprises of a python script and a collection of ASCII art to be displayed every time you open a terminal window in Linux. It works on Unix-based systems such as Linux and Mac OSX.

Requirements:

  1. python3 – mostly installed on all Linux distributions, if not use our Python installation guide.
  2. curl – a command-line tool for downloading files.

An internet connection is required, because the ASCII arts are pulled from the ASCII-Art-Splash-Screen github repository – this is one downside of it.

How to Display Random ASCII Art on Linux Terminal

Open a terminal, and start by installing curl command line tool on your system, using the appropriate command for your distribution.

$ sudo apt install curl		#Debian/Ubuntu 
# yum install curl		#RHEL/CentOS
# dnf install curl		#Fedora 22+

Then clone the ASCII-Art-Splash-Screen repository on your system, move into the local repository and copy the file ascii.py into your home directory.

$ git clone https://github.com/DanCRichards/ASCII-Art-Splash-Screen.git 
$ cd ASCII-Art-Splash-Screen/
$ cp ascii.py ~/

Next, run the command below, which adds the line “python3 ascii.py” in your ~/.bashrc file. This enables running of the ascii.py executable script every time you open a terminal.

$ echo "python3 ascii.py" >> ~/.bashrc

From now on, when you open a new Linux terminal, a random ASCII art will be displayed before the shell prompt appears.

Do check out following sample ASCII arts displayed in a new Linux terminal.

ASCII Art

ASCII Art

ASCII Art Example 1

ASCII Art Example 1

ASCII Art Example 2

ASCII Art Example 2

To stop this, simply comment out or remove the line python3 ascii.py from your ~/.bashrc shell startup file.

For more information check out ASCII-Art-Splash-Screen at: https://github.com/DanCRichards/ASCII-Art-Splash-Screen

You might also like to read these useful articles about Linux command line tricks:

  1. Gogo – Create Shortcuts to Long and Complicated Paths in Linux
  2. How to Show Asterisks While Typing Sudo Password in Linux
  3. How to Clear BASH Command Line History in Linux
  4. How to View Colored Man Pages in Linux

In this short guide, we’ve shown how to display random ASCII art on your Linux terminal using ASCII-Art-Splash-Screen utility. Use the feedback form below to share your thoughts about it.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.