Sample Header Ad - 728x90

How to view ~ (tilde) instead of home directory in bash?

0 votes
2 answers
2809 views
I've changed my home directory from /home/alessandro to /mnt/c/Users/aless/Documents/uni/labcalc (I am using debian in WSL so /mnt/c is C:\ in windows). When I type cd ~ it correctly goes to my new home directory but in bash the full path is shown and not just ~$. How can i fix this? UPDATE: My $PS1 variable is: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
Asked by Alessandro Costantini (1 rep)
Dec 16, 2020, 12:04 PM
Last activity: Dec 16, 2020, 07:24 PM