For changing the background (and text) colours, you simply go to profile preferences and set it there:
![](https://cdn.statically.io/img/i.sstatic.net/u6nAQ.png)
For the prompt itself, this is set in the prompt itself, this is more complex. This is set from the ~/.bashrc
hidden file (or another similar file), probably using a line like this (it will begin with PS1
):
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u@\h\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]\$ '
The colour in the prompt is set using escape codes (if the terminal being used supports it)- so basically each bit of \033[Nm
sets the format for the following text, depending on what N
(N
can be multiple things separated by ;
BTW).
For the basic colours, you can use the simple numeric codes listed here:
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/FMBiA.png)
1 Makes stuff bold, 0 resets - multiple things can be used as well - e.g:
echo -e "\033[1;32mExample\033[0m"
Otherwise you can set your own colour (probably limited support):
echo -e "\033[38;2;240;115;0mOrange\033[0m"
So you can fairly easily edit the PS1 line to suit (and test it with echo -e ...
). I recently did this with various colours for different machines so I could use multiple terminals without typing the right command into the wrong computer...