I'm running Ubuntu from inside a VirtualBox (host=Win XP), and use the Terminal (Xfce terminal emulator v0.4.8) in order to issue commands to FreeSurfer, an analysis software package.

The problem is that these commands issue a LOT of text, and it's very hard to scroll up and find my initial command, because all the text is of the same color (white). I've used other terminals where the input/output lines were differently colored, allowing an easier detection of your own issued commands as opposed to output text.

I checked the terminal options but did not see anything helpful (I cannot attach a screenshot so I've uploaded it here: http://www.2shared.com/photo/rkjbTpQ6/20140402_12-23-42.html).

Would appreciate any help on how I can increase the visibility (discriminability) of the different types of text (input/output) in the terminal window, thanks!


You can try to change your bash prompt color

Enter this in your terminal

PS1="([\033[1;37m]\u[\033[1;33m]@[\033[1;37m]\h)[\e[0m] "

This will change your prompt color to white, and you will be able to distinguish output from input.

Another one

PS1='[\e[1;31m][\u@\h \W]\$[\e[0m] '


PS1="\n[\e[1;30m][$$:$PPID - \j:![\e[1;30m]][\e[0;36m] \T [\e[1;30m][[\e[1;34m]\u@\H[\e[1;30m]:[\e[0;37m]${SSH_TTY:-o} [\e[0;32m]+${SHLVL}[\e[1;30m]] [\e[1;37m]\w[\e[0;37m] \n\$ "

Here is a link, where you can customize your prompt as you wish.

If you satisfied with this solution, you can make this settings permanent by editing your $HOME/.bashrc. Just add this line at the end, or you can change this part of .bashrc:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;31m\]\w\[\033[00m\]\$ '
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

Little mark

\e - encoded colors
\W - short directory
\w - long directory
\t - time (hh:mm:ss)
\s - shell
\d - date (sat jul 22)
\h - hostname
\u - user

If it is interesting for you, I recommend you to read this wiki and this

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.