2

For work I just did source .profile from other user, but it changed my bash prompt.

It used to be

[leche@xxx home]$
[leche@xxx home]$

And now it appears like:

[leche@xxx] [10:18 AM$] /home $
 $
 [leche@xxx] [10:18 AM$] /home $
 $

How may I change it back?

  • source ~/.bash_profile or source ~/.profile or source /etc/profile. – DopeGhoti Dec 28 '16 at 16:55
  • The change is only temporary. You could simply close the shell and open a new shell. – kasperd Dec 28 '16 at 23:35
10
PS1='[\u@\h \W]\$ '

Search the manual for PS1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.