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.

If you read this far, tweet to the author to show them you care. Tweet a thanks
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.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.