hi,
I want to colorize my bash prompt, and added .bash_profile in my home dir (/root):
----8<-------- #############################################################################
export PS1=‘[\033[01;31m]\u[\033[01;33m]@[\033[01;36m]\h [\033[01;33m]\w [\033[01;35m]$ [\033[00m]’ umask 022
#############################################################################
eval “dircolors”
#############################################################################
alias ls=‘ls $LS_OPTIONS’ alias ll=‘ls $LS_OPTIONS -l’ alias l=‘ls $LS_OPTIONS -lA’ alias …=‘cd …’ alias …=‘cd …/…’ alias s=‘ssh -l root’
#############################################################################
export EDITOR=“nano”
export HISTFILESIZE=99999999 export HISTSIZE=99999999 export HISTCONTROL=“ignoreboth”
export LS_OPTIONS=‘–color=auto -h’
############################################################################# #naj:
if [ -f ~/.bashrc ]; then source ~/.bashrc fi ----8<--------
that did not work, and adding above to .bashrc either.
How can I get bash colorized?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
To try it first without saving type: <br><pre>export PS1=“\e[0;32m[\u@\h \W]$ \e[m “</pre> <br> <br>If the color is ok then you can save it to your user’s .bashrc typing: <br><pre>export PS1=”\e[0;32m[\u@\h \W]$ \e[m”</pre> <br> <br>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
