Do you want to celebrate your indepedence on the country’s birthday this year? Of course you do. What better way to do that than to proudly display the American flag in your command prompt? Now, I may be biased, but I think America is the best and most exceptional country in the world. Which means we also have the best flag.
Complete written guide: https://chrismaiorana.com/flag-linux
In this tutorial, we’re going to go through the whole process of installing an emoji font in your Linux operating system and adding it to the bash command prompt. And first, ask yourself. Does Your Terminal Support Emoji Fonts? Some terminals only support plain text with very little (if any) font support. And some do not support the graphic capabilities you’ll need to render emojis as you expect. For a good, basic terminal that supports emojis, you can use the gnome-terminal, which I will be using in this tutorial.
What are emojis anyway? They are basically fonts. If you’ve installed fonts on your computer before, then you know what I’m talking about. You install a font into your system, and you can use it wherever fonts are accepted. Pretty simple, right?
Now, some of these fonts require certain programs to be installed on your computer in order to work properly. So in order to make sure our font display as intended we’re going to use a package manager (in this case, apt) to make sure all of those dependencies are installed as well.
Note: You probably already have all the dependencies anyway, but this is a good way to install fonts, ’nuff said.
I will assume here that you have a way of viewing fonts in your system. If not, you can install the basic font-manager package:
sudo apt install font-manager
There are a few different emoji fonts out there. We’re going to use the fonts-noto-color-emoji package because it is fairly complete, with a lot of emojis — including the one we want: the American flag.
sudo apt install fonts-noto-color-emoji
Now you should have an emoji font available for use one your system.
Copy the fonts-noto-color-emoji font to the /.local/share/fonts directory and run this command:
fc-cache -fv
Now, I would recommend rebooting, just to make sure everything restarts fresh with this new stuff you’ve added to your system configuration.
Now, finally, the moment we’ve been waiting for. It’s time to show your patriotic spirit by putting the American flag in your bash prompt.
First of all, I would recommend using the prompt that came with your distro’s default .bashrc file. Bash prompts are a difficult syntax to write by hand. And your initial setup might have some features already built. So I’m going to grab my default and copy it somewhere safe before updating it. I suggest you do likewise.
Save the file.
And the final result, when you open up the gnome-terminal should look something like what you see in the video.