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 delete

2 Answers

Sort by ยป oldest newest most voted
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 publish 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
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 publish 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

when I enter the command ~ /. bashrc appears :permission denied.

giacguiccia ( 2011-12-09 13:45:27 +0000 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

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 to your questions.
  • 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,042 times

Last updated: Dec 09 '11