Customize your terminal to the maximum

To continue with our Tutorials about the use of terminal, today we are going to explain how customize it, so you can leave it to your liking and stop making your computer look like it was from the 70s.


This tutorial will consist of 4 parts, from the most basic, modifying the terminal options directly from the terminal menu «Profile preferences» to modifying the .bashrc file. Let us begin!

Menu «profiles» and «profile preferences»

Linux gives us options to create profiles. Each of these profiles will have certain options (background color, font, etc.). For most users, just use the default profile, but if you need to create more, you can do so by clicking on Edit> Profiles ...> New . In that same window you can select which profile to use at all times.

Once you have the profile that you want to change, you go to Edit> Profile Preferences, where you will be shown several tabs:

  • General: Here you can change the type and size of the font to use, the size of the console, the type of cursor, activate or deactivate the sound, etc.
  • Title and command: Here it is possible to customize the title of the terminal, define the action to take when an order ends, etc.
  • Colors: This is the tab that gives the most play. You can change the color of the text and the background, as well as the color palette that the different orders can use. Although color schemes are already included, I recommend that you try the combination that you like the most.
  • Background: Instead of having a single color background, this tab allows you to change it to a background image. Choose the photo well, because if it has colors similar to those you use in the text, it will be difficult for you to read later. I recommend a simple image, with few colors and few figures. You can also put a certain degree of transparency.
  • Displacement: To change the position of the scroll bar and the number of lines that can be moved back. If you use the terminal with programs that execute many commands, I recommend that you do not put unlimited scrolling, your memory will thank you 😉
  • Compatibility: Do not touch anything on this tab if you do not know exactly what you are doing, as any change can make everything stop working as it should. If everything works fine for you so far, don't change anything.

Show your name or any other message when opening the terminal

In the last tutorial (here) a lot of people asked me to teach them to display some large letters every time the terminal is opened. To achieve this, we will first have to install the program Figlet. The purpose of this program is to transform the text that we pass as a parameter into a more interesting text. Here's an example:

To begin we will have to install several programs as follows:
Ubuntu:
sudo apt-get install figlet cowsay fortune fortunes-en fortunes-en-off

fedora:

sudo yum install figlet cowsay fortune fortunes-en fortunes-en-off

Once it has been installed correctly, we go to our main directory:

cd $ HOME

and we open with gedit (or the text editor you prefer) the terminal configuration file .bashrc:

gedit .bashrc

Now it is very important that what that file contains you do not modify at all. All we are going to do is add rows at the end.

To get your name out in big letters write:

figlet Your Name

For you to get a beautiful cow saying a message write:

cowsay Your message

Look at the options for the cowsay command (cowsay –help) to change the appearance of the cow.

So that you get a message like in Chinese fortune cookies:

fortune

Save the file and open a new terminal to check the result.

Change prompt colors

The prompt is the message that the terminal gives to indicate that it is waiting for orders (the classic user @ machine: ~ $ )  

Linux gives us the option to customize it, for this we have to continue editing the .bashrc, to know how to do it, see this old article: 

https://blog.desdelinux.net/terminales-con-estilo-personaliza-tu-prompt/

I hope it has served you. Do not hesitate to comment on your creations in the comments!

Thanks José Linares!

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   bastet_tsuki said

    excellent data, thank you very much for sharing.

  2.   Saito Mordraw said

    Very good tuto, the most I do is change the font, color and background image.

    Thank you very much.

  3.   Joshua Aquino said

    Here is my config for the .bashrc
    PS1=’┌─[u@h W][e[0;32m][${cwd}t][33[0m] ${fill}n[33[0m]└─■ ‘

    something like this looks:http://ompldr.org/vZnBnNA
    regards!

  4.   Jaime0.1. said

    Excellent look great

  5.   Diego said

    bravo…
    Thank you.

  6.   LUIS said

    I want to change the background of the terminal but in profile preferences the background tab does not appear I have ubuntu 14.04lts

  7.   martin said

    Hello, how do I configure the editor in the terminal to be vi? And not the default one (which I don't know what it is), Thanks.

    1.    Anonymous said

      in the terminal just type
      I saw example1 and voila and pressing esc you switch to editor mode

  8.   juanjava said

    Hello, thanks for your contribution, I tell you that in my case the following instructions do not run and they tell me that they are in the latest versions
    root @ debsergis: / home / hydra # fortune
    bash: fortune: command not found
    root @ debsergis: / home / hydra # cowsay hello friend
    bash: cowsay: command not found
    y
    root @ debsergis: / home / hydra # apt install figlet cowsay fortune fortunes-es fortunes-es-off
    Reading package list ... Done
    Creating dependency tree
    Reading status information... Done
    Note, selecting ÂŤfortune-modÂť instead of ÂŤfortuneÂť
    cowsay is already in its most recent version (3.03 + dfsg2-3).
    figlet is already in its most recent version (2.2.5-2 + b1).
    fortune-mod is already in its most recent version (1: 1.99.1-7 + b1).
    fortunes-es is already in its most recent version (1.34).
    fortunes-es-off is already in its most recent version (1.34).
    0 updated, 0 new will be installed, 0 to remove, and 0 not updated.
    Now, because I change the accents where I change it and / or where I can configure it
    thank you very much for your help