10 tools to generate and have fun with ASCII art in Linux

The Linux terminal isn’t as scary as you think.

Of course, it might be intimidating at first, but once you get to know the terminal better, you’ll start to love it.

You will probably use the terminal for serious work. But there are also lots of fun things you can do in the terminal.

One of them is experimenting with ASCII art. You can display predefined or random messages, play games or run animations in ASCII format in the Linux terminal using various command line tools.

My teammate Sreenath enjoys exploring such unusual CLI tools and sharing his insights with me. I share these insights with you.

Most of these programs should be available in your Linux distribution’s repositories. You can use your system’s package manager to install them. To keep the article concise, I’ve only included the installation guide for Ubuntu.

1. lolcat: Add colors to your terminal

In order! lolcat has nothing to do with ASCII art. At least not directly.

Nevertheless I put it at the beginning of this article because you can combine other ASCII tools with lolcat.

So what does it do? It is similar to the cat command but adds random gradient colors to its output.

sudo apt install lolcat

2. Aewan: Displays ASCII text nicely

Aewan is a multi-layer ASCII graphics/animation editor. It produces standalone cat-enabled ASCII graphics files and an easy-to-parse format for integration into terminal applications.

It has two tools: aewanan ASCII editor and aecatto view the created file.

I won’t go into the editor part here.

sudo apt install aewan

And then use it like this:

aecat hello

3. Cowsay: Have an ASCII cow say whatever you want

What is the cow saying? whatever you want to say

Cowsay is already a popular tool among experienced Linux users. It shows an ASCII cow repeating the text you provided.

cow wisdom

Notice the colored output in the screenshot above? That’s the magic of the lolcat command I mentioned earlier.

To install Cowsay use:

sudo apt install cowsay

Once installed, you can use it as follows:

cowsay hello

See the man page for other configurations and options.

4. jp2a: Convert images to ASCII art

jp2a is a command line tool that converts images to ASCII art in the Linux terminal. It works with JPEG and PNG files. It also allows for colored output and your choice of character set that appears as an ASCII image.

jp2a

You can install it with the following command:

sudo apt install jp2a

You can get the colored output and save the ASCII text like this:

jp2a --output=ascii.txt --colors input.png

It’s not the only program of its kind. There are ascii-image-converter and several other tools that could be used for the same purpose. I will not discuss all of them on this list.

5. linuxlogo: Displays the ASCII logo of your Linux distribution

The name says it all. It displays the Linux logo in ASCII format.

No, not our beloved Tux Linux logo, but the logo of your Linux distribution. It also shows some additional information like Linux kernel version, CPU, RAM, hostname etc.

Linux logo

You can install it with the apt command:

sudo apt install linuxlogo

Just type linuxlogo to use the command.

6. Neofetch: Displays the Linux logo along with system information

The linuxlogo command above is too simple. You can amplify it by using Neofetch.

It displays the distro in a prettier way along with several system information like kernel, uptime, desktop environment, theme, icons etc.

sudo apt install neofetch

Then just type neofetch to run the command.

There’s also Screenfetch, a tool similar to Neofetch. You can use both.

7. Fortune: Let the future tell you

Just kidding! That does not exist.

However, fortune cookies are still in vogue and apparently people enjoy reading random predictions or teachings.

You can get a similar function in Linux terminal using Fortune command:

sudo apt install fortune

Once installed, simply type Fortune into the terminal to receive a random message.

8. pv: animate things

This is a classic example of unintentionally using a Linux command. The pv command is used to monitor the progress of data through the pipe.

However, you can use it to animate the output of any command. Combine it with some of the above commands and you can see the ASCII graphic appear on your screen as if it was typed.

Do not you understand? Watch this video:

Install it with the following command:

sudo apt install pv

And then use it in the following way:

neofetch | pv -qL 200 | lolcat

The higher the number, the faster the speed.

9. cmatrix: Matrix-like animation in ASCII

Remember the cult geek move Matrix? The green falling code is synonymous with matrix and hacking.

You can run an ASCII simulation of the falling code in the Linux terminal using the cmatrix command.

I’m sharing a screenshot here instead of an animation.

sudo apt install cmatrix

After installation you can run it with:

cmatrix

It starts the animation immediately and keeps generating random green text that falls off the screen and disappears. The command continues. To stop the running application, use the shortcut Ctrl+C.

10. cbonsai: grow a bonsai in your terminal

Do you have a green thumb? How about growing an ASCII bonsai tree in the terminal?

cbonsai is a fun Linux command that lets you run a bonsai tree animation in ASCII format.

I shared a YouTube shorts from Cbonsai Command a few days ago.

You can install cbonsai with:

sudo apt install cbonsai

Then use this command to run the animation:

cbonsai -l

Try something else

There are many more such fun CLI tools out there. Hell, there are ASCII games too. It’s fun to use them sometimes to amuse the people around you.

Can you put these commands to good use? Not sure about usability but you can put some of these in your .bashrc file so the command will run as soon as you open a terminal session.

Many system administrators do this on shared Linux systems. A program like cowsay or figlet can be used to display a message or system info in a pretty way.

You can also use some of these programs in your bash scripts, especially if you need to highlight something.

There might be other uses of ASCII art in Linux. I’ll let you share them with the rest of us here.

Leave a Comment

Your email address will not be published.