-5

When I open my URxvt I can see this:

[username@Lenovo ~]$ ...

however, I can see someone can edit it to make it look like:

username ~ $ ...

with username formatted with a color. Is there a way to do it?

jasonwryan
  • 71,734
  • 34
  • 193
  • 226
  • 5
    Please search for answers before posting a question, this has been asked many times before. e.g. http://unix.stackexchange.com/questions/12335/how-to-customize-bashrc-to-configure-command-prompt – icarus Nov 19 '16 at 17:53
  • It can indeed be done, as you know and saw. You can use ANSI codes for the color. PS1 is the variable used for the default prompt. – Julie Pelletier Nov 19 '16 at 17:53
  • @icarus can you link me something? – Xtupdup Nov 19 '16 at 17:54
  • See this previous question [How to customize .bashrc to configure command prompt?](http://unix.stackexchange.com/questions/12335/how-to-customize-bashrc-to-configure-command-prompt) or refer to the [ArchLinux wiki on Bash/Prompt customization](https://wiki.archlinux.org/index.php/Bash/Prompt_customization) – steeldriver Nov 19 '16 at 17:56

1 Answers1

0

What you want to do is customizing your bash prompt. Here is a generator with instructions: http://ezprompt.net

blissini
  • 364
  • 1
  • 5