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.
- python3 – mostly installed on all Linux distributions, if not use our Python installation guide.
- 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.
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:
- Gogo – Create Shortcuts to Long and Complicated Paths in Linux
- How to Show Asterisks While Typing Sudo Password in Linux
- How to Clear BASH Command Line History in Linux
- 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.