Wednesday, January 15, 2014

Set Linux Terminal Background Color

       Hi friends, it is observerd that there are many people who don't like the black screen of the terminal, in that case we can set the color of the terminal as required. If one wants to set the background color using shell script it can be done as follows:

 Open a terminal and use the command as shown below:
         $setterm -term linux -background white -foreground black

Figure 1: Set Background Color
In the above command the -term attribute defines the type of terminal used by the user, -clear is used to clear the screen and set the color from top the screen. Whereas the attributes -background and -foreground sets the background and foreground color respectively. So after the command is executed the screen looks as shown below.
Figure 2: After setting the color of the terminal
For more information on setterm please refer the manual pages of Linux, the command for its is man setterm