Ask Your Question

Default text colour in the terminal?

asked 2011-12-09 04:50:24 -0600

giacguiccia gravatar image

Hi, after the latest system updates, the user-name of the terminal and other items have changed colour (example: user-name now is green), and i don't know why. How do i get back with black texts (with always white background)? I tried with "preference profile"-> colours, but nothing is changed. I don't know if I'm wrong somewhere. Is there a command to reset the settings? Thanks for the help. I'm a novice user. Jack

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-12-09 06:56:37 -0600

shaiton gravatar image

updated 2011-12-09 11:38:58 -0600

Under gnome-terminal, you could define the default profile under edit->profiles->edit.

Actually you don't have the default prompt. Run the following command to change it for your current terminal session:

$ PS1="[\u@\h \W]\$"

If this is doing what you are looking for, then edit the file .bashrc at your home directory. Use the editor of your choice:

$ gedit ~/.bashrc

At the end of this file, add the command used before: PS1="[\u@\h \W]\$". Share your actual .bashrc file (using for example), there should have been some change in your current file (which would be overridden by the above edit).

edit flag offensive delete link more


@giacguiccia I've just updated my answer. Please note that the command starting with the "$ " sign are run under a simple user. When you need special right, we use the "# " sign to show a root prompt.

shaiton gravatar imageshaiton ( 2011-12-09 11:40:54 -0600 )edit

answered 2011-12-09 07:08:05 -0600

giacguiccia gravatar image

I typed the command into the terminal and got:

giacomo@giacomo ~$ echo $PS1 [\033[01;32m]\u@\h[\033[00m] [\033[01;34m]\W[\033[00m][\033[1;32m]\$[\033[m]

I'm using gnome-terminal(default).

edit flag offensive delete link more


Better would have been to comment my response. Please format you text using the formatting syntax.

Please check your ~/.bashrc file in order to see if you redefine PS1. Basic one is PS1="[\u@\h \W]\$"

shaiton gravatar imageshaiton ( 2011-12-09 07:15:22 -0600 )edit

Question Tools


Asked: 2011-12-09 04:50:24 -0600

Seen: 2,263 times

Last updated: Dec 09 '11