I use a single ~/.bashrc file in all my machines that log in and I have the following line to display the command prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
I don’t want to see the username if it is ‘sudar’ but want to see it otherwise. How can I change the above line to drop the username part if it is equal to ‘sudar’?
1 Answer