bash PS1 shows /home/boom/git instead of ~/git

41 Views Asked by At

When I start bash, it looks like boom@server:~$, but when I start changing current directory, it shows full path. Even if I switch dir back to home, it shows boom@server:/home/boom$. how can I fix that?

using Ubuntu Server 20.04.1 LTS amd64

1

There are 1 best solutions below

2
TheSlater On BEST ANSWER

The backslash at the end of your $HOME variable is the problem. Try first

HOME=/home/boom

and everything is normal. Search in ~/.profile and/or ~/.bashrc files where your $HOME variable is set.