0

In any terminal there is specific meaning of puneet@Puneet-Ubuntu-PC:~$I want to replace '$' symbol with '>'.

Please guide me How can I make this change.

0

1 Answer 1

2

Open .bashrc file with your favorite text editor. In my case I used nano. Find the line that looks like

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

In my case it was at line 53. Replace it with:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]> '

And you are done. Open a new terminal to see changes.

3
  • I believe there's an error at the very end of your replacement line. Shouldn't it end in \> '?
    – heynnema
    Nov 28, 2018 at 20:55
  • 1
    @heynnema Nopes. Actually \ is used to print special characters which has other meanings. And as far as I know \ was used before $ so that $ isn't mistaken as staring of new command. PS: I tested both the situations before writing the answer. If I consider \ prompt is like \>. And Formatting comment with \ is giving me a headache
    – Kulfy
    Nov 28, 2018 at 21:00
  • Fair enough! Good job.
    – heynnema
    Nov 28, 2018 at 21:03

Not the answer you're looking for? Browse other questions tagged .