Tuesday, July 30, 2013

Basic Prompts


edit bash personal configuration file
$ nano ~/.bashrc

comment out the default prompt


# PS1='[\u@\h \W]\$ '

add the following yellow prompt for regular users:

PS1='\[\e[1;33m\][\u@\h \W]\$\[\e[0m\] '

edit root's .bashrc file; copy it from /etc/skel if file is not present

#nano /root/.bashrc

Assign a red color prompt for root comment out default prompt

PS1='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '




No comments:

Post a Comment