add this column into it
# add color to shell prompt
export PS1="\e[0;31m[\u@\h \W]\$ \e[m"
Here is the description
\e = start color scheme
0;31 = choice of color
\u = Display the current username
\h = Display the hostname
0;31 = choice of color
\u = Display the current username
\h = Display the hostname
\W = Print the current working directory
\e[m = Stop color scheme
$PS1 is your shell prompt
\e[m = Stop color scheme
$PS1 is your shell prompt
additional
\H = Display FQDN hostname
\@ = Display current time in 12-hour am/pm format
List of Color code
| Color | Code |
| Black | 0;30 |
| Blue | 0;34 |
| Green | 0;32 |
| Cyan | 0;36 |
| Red | 0;31 |
| Purple | 0;35 |
| Brown | 0;33 |
No comments:
Post a Comment