set the colour for normal users.
1: Go to the home directory, and create the following file:
vim .bash_profile
2: Insert the following content into the file:
export TERM="xterm-color"
PS1='\[\e[00;32m\]\u\[\e[0m\]@\[\e[00;32m\]\w\[\e[0m\]\$'
The definition of each colour can be referred to the previous article.
3: save the file. Make it validated.
source .bash_profile
-------------------------------------
set the colour for root.
1: login as a root.
sudo -i
and then, enter the password.
2: create the following file:
vim .profile
3: Enter the following content into the file (can be the same as normal users):
export TERM="xterm-color"
PS1='\[\e[00;31m\]\u\[\e[0m\]@\[\e[00;31m\]\w\[\e[0m\]\$'
4: save the file and make it validated immediately.
source .profile
-------------------------------------
1: Go to the home directory, and create the following file:
vim .bash_profile
2: Insert the following content into the file:
export TERM="xterm-color"
PS1='\[\e[00;32m\]\u\[\e[0m\]@\[\e[00;32m\]\w\[\e[0m\]\$'
The definition of each colour can be referred to the previous article.
3: save the file. Make it validated.
source .bash_profile
-------------------------------------
set the colour for root.
1: login as a root.
sudo -i
and then, enter the password.
2: create the following file:
vim .profile
3: Enter the following content into the file (can be the same as normal users):
export TERM="xterm-color"
PS1='\[\e[00;31m\]\u\[\e[0m\]@\[\e[00;31m\]\w\[\e[0m\]\$'
4: save the file and make it validated immediately.
source .profile
-------------------------------------
THEN, THE WORLD BECOMES COLOURFUL! :-)
Aucun commentaire:
Enregistrer un commentaire