English
Ask Your Question
0

Default text colour in the terminal?

asked 2011-12-09 10:50:24 +0000

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
0

answered 2011-12-09 13:08:05 +0000

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

Comments

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 ( 2011-12-09 13:15:22 +0000 )edit
0

answered 2011-12-09 12:56:37 +0000

updated 2011-12-09 17:38:58 +0000

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 fpaste.org 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

Comments

@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 ( 2011-12-09 17:40:54 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2011-12-09 10:50:24 +0000

Seen: 1,374 times

Last updated: Dec 09 '11