0

This might be a n00b question, but recently I started to use Vagrant with Ubuntu 12.04 and I discovered, every line in the command line looks like this:

enter image description here

I have a Raspberry Pi, but Debian on it has the same look as Ubuntu:

enter image description here

How could I change the look of this "title" before every command, to show the actual time for example? It would be nice sometimes to see, when I entered a command.

1
  • This is set by a environment variable $PS1. The Q/A I've linked you to should go some distance to explain what you can do with it.
    – Oli
    Mar 25, 2014 at 15:35

1 Answer 1

0

You can try with this command:

PS1="\$(date +%H:%M:%S) $PS1"

You can have it more elaborated like this:

export PS1='\[\033[0m\]\[\033[0;30;47m\] \u\[\033[0m\]\[\033[0;30;47m\]@\h\[\033[0m\] \w\n\[\033[1;32m\] \@ \$ \[\033[0m\]'

If you don't like it, just mess with it a little, to adjust it for your needs

Not the answer you're looking for? Browse other questions tagged .