Friday, June 3, 2022

[SOLVED] Changing the terminal color permanently in raspberry pi

Issue

I tried to change the color of my terminal pi@ajeeth:~ $ in raspberry pi to red I mean the letters to red and the background of the terminal to blue(not the whole background only terminal's)using setterm -foreground green -background red but then it did not change the color of the letter and changed only the background for a single command but I want it forever so, could you tell me a code which changes the letter of a terminal permanently


Solution

put something like this in your ~/.bashrc or ~/.bash_profile to at least alter your PS1

export PS1="\e[40;31m\$USER@\$HOSTNAME:\$(echo \$PWD | sed 's@$HOME@~@') \$\e[m "


Answered By - pyr0
Answer Checked By - Marilyn (WPSolving Volunteer)