The Wayback Machine - https://web.archive.org/web/20240802225541/https://www.geeksforgeeks.org/how-to-display-random-ascii-art-on-linux-terminal/
Open In App

How to Display Random ASCII Art on Linux Terminal?

Last Updated : 08 Feb, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report

Here we are going to see how to print the drawing on the terminal in the form of ASCII characters. ASCII-Art-Splash-Screen is a tool written in python that pulls a random drawing from a repository and shows it every time you open the terminal. This works on UNIX-based systems like Linux and macOS. 

Now let’s see how to install the ASCII-Art-Splash-Screen tool on our Linux system.

Requirements to install

The followings are the two requirements to install the ASCII-Art-Splash-Screen tool:

Let’s see how to install curl:

To install curl on the Debian based system like Ubuntu and Kali Linux use the following command:

sudo apt install curl

For systems like RHEL/CentOS:

 yum install curl

For the Fedora 22+:

dnf install curl

How to Display Random ASCII Art on Terminal

Before moving further make sure that you have installed these dependencies on the system.

Installation of ASCII-Art-Splash-Screen tool

Now let’s see how to install ASCII-Art-Splash-Screen tool. First clone the GitHub repository on the system using the following command:

git clone https://github.com/DanCRichards/ASCII-Art-Splash-Screen.git 

After this move into the local repository and then copy the ascii.py file into the home directory. Use the following commands to do this:

cd ASCII-Art-Splash-Screen/
cp ascii.py ~/

Now to get the ASCII art on the terminal when we open the terminal we need to put python3 ascii.py command into the .bashrc file. Use the following command to put this command into .bashrc file

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

How to Display Random ASCII Art on Terminal

We have successfully installed the ASCII-Art-Splash-Screen  tool on our Linux system. 

Now when you open a new terminal you will see the new ASCII art on the terminal every time. Here are some of them.

How to Display Random ASCII Art on Terminal

ASCII art1

How to Display Random ASCII Art on Terminal

ASCII art2

How to Display Random ASCII Art on Terminal

ASCII art3

This is how we can print the ASCII art on an open new terminal.



Similar Reads

Python | ASCII art using pyfiglet module
pyfiglet takes ASCII text and renders it in ASCII art fonts. figlet_format method convert ASCII text into ASCII art fonts. It takes following arguments : text font ( DEFAULT_FONT = 'standard' ) Command to install pyfiglet module : pip install pyfiglet Code #1: Text in default font # import pyfiglet module import pyfiglet result = pyfiglet.figlet_fo
6 min read
What is ASCII - A Complete Guide to Generating ASCII Code
The American Standard Code for Information Interchange, or ASCII, is a character encoding standard that has been a foundational element in computing for decades. It plays a crucial role in representing text and control characters in digital form. Historical BackgroundASCII has a rich history, dating back to its development in the early 1960s. Origi
13 min read
Substring with maximum ASCII sum when some ASCII values are redefined
Given a string W, and two arrays X[] and B[] of size N each where the ASCII value of character X[i] is redefined to B[i]. Find the substring with the maximum sum of the ASCII (American Standard Code for Information Interchange) value of the characters. Note: Uppercase & lowercase both will be present in the string W. Input: W = "abcde", N = 1,
9 min read
Check if a string contains a non-ASCII value in Julia - ascii() Method
The ascii() is an inbuilt function in Julia which is used to convert a specified string to a String type and also check the presence of ASCII data. If the non-ASCII byte is present, throw an ArgumentError indicating the position of the first non-ASCII byte. Syntax: ascii(s::AbstractString) Parameters:s::AbstractString: Specified stringReturns: It r
1 min read
ASCII NULL, ASCII 0 ('0') and Numeric literal 0
The ASCII (American Standard Code for Information Interchange) NULL and zero are represented as 0x00 and 0x30 respectively. An ASCII NULL character serves as a sentinel character of strings in C/C++. When the programmer uses '0' in his code, it will be represented as 0x30 in hex form. What will be filled in the binary integer representation in the
3 min read
Cool Custom Welcome Messages on Linux terminal
There is a Linux hack which can be used to display a custom message on the terminal every time we open it. This can be done by manipulating the .bashrc shell script. What is .bashrc ? It is a shell script that Bash runs whenever it is started interactively. You can put any command in that file that you could type at the command prompt. Steps on how
3 min read
Custom commands for linux terminal
Linux operating system allows users to create commands and execute them over the command line. To create a command in Linux, the first step is to create a bash script for the command. The second step is to make the command executable. Syntax : $ nano ~/.bashrc Here, bashrc means run the Bash file. Bash is located at /bin/bash . This file helps in c
2 min read
How to copy a file's content from Linux terminal?
This article shows the alternative method to copy the content of the file onto the clipboard, via the Linux terminal. In OSX, the commands pbcopy and pbpaste are available by default. Thus, to copy a file onto the clipboard via OSX terminal, type: pbcopy < 'path of the file' Since, in Ubuntu, pbcopy and pbpaste commands are not availab
2 min read
How to Browse From the Linux Terminal Using W3M?
W3M is an open-source text-based terminal web browser for Linux used to browse through the terminal. It is simple to use and do not require any additional interacting interface application though it interacts through the terminal. It renders the web pages in a form as their original layout. How to Install W3M? As W3M is not included by default on m
1 min read
Using Lynx to Browse the Web From the Linux Terminal
Lynx is a terminal-based web browser for all Linux distributions. It shows the result as plain text on the terminal. It is a classic non-graphical text-mode web browser which displays the pages on the terminal. Lynx does not load images and multimedia contents, hence it is fast as compared to other browsers. One who do not want so many images and m
2 min read
Article Tags :
three90RightbarBannerImg