Command colors when login on as root/user

To add red to command line when logged in as root add
1. open
/root/.bashrc

2. add
PS1="\[\e[31m\]\u@\h:\w#\[\e[m\]"

To add green to command line when logged in as a normal user
1. open
~/.bashrc

2. Add
PS1="\[\e[32m\]\u@\h:\w\$\[\e[m\]"

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: