How to activate the colors of the Terminal

In some Linux distributions, the terminal it only shows two colors, so it is sometimes difficult to differentiate files or lines at a glance. In some other distributions, the Terminal does display the information in various colors. If we use an operating system or a variant of the first group, how can we activate the colors? Well, following a few simple steps that can be done from the same terminal to which we want to give a little life.

per activate colors of the Terminal we will have to edit the file ~ / .Bashrc. By default, the file does not exist or is empty, but there is a test one in the path / Etc / skel. By editing this test file and setting it to the correct path, the colors of the terminal will be displayed as in the screenshot that heads this article. Here are the steps to activate the window colors of this widely used tool.

How to activate the colors of the Terminal where it is not by default

  1. We will first copy the ~ / bashrc file to the desktop by opening a terminal and typing the following command:
cp /etc/skel/.bashrc ~/.bashrc
  1. Then we write this other command to edit:
nano ~/.bashrc
  1. The contents of the file will be displayed in the same window. We have to look for the line he puts # Force_color_prompt = yes and remove the pad (#) in front of the line, leaving it force_color_prompt = yes. To advance, you can use the shortcut Ctrl + W, enter the text “force” and press Enter.
  2. Then we save with Crtl + O and exit with Ctrl + X.
  3. And finally, we reload the profile with the following command:
source ~/.bashrc

If everything went well, you can check that the colors have been activated by closing the current window, reopening a new one and typing “ls”. It should show you an image like the one that heads this little tutorial, with the user in one color, what we write in another and the folders in another. What do you think?


Related Posts

Next Post

Leave a Reply

Your email address will not be published. Required fields are marked *

You might also like

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.