You are not logged in.
So I reinstalled arch linux because of a problem I was having but decided to leave my /home partition untouched, so let's say I had home/name for my user.
Usually, before the formatting, it would say [user@hostname ~]$, but since the reinstallation it always appears [user@hostname name]$. I know it's nothing major but I'd like to change that.
Doing cd ~ brings me to the "name" directory aswell as cd $HOME. I created my user with useradd -g wheel name and once it was created I did usermod -d /home/name name so that it would go to the right directory, however it's having that small issue. Any idea on how I could fix this?
Thanks in advance.
Last edited by jonhykrazy (2018-02-16 00:25:23)
Offline
[\u@\h \W]\$ does it the way you want on my computer. Just set $PS1 to that and it should work.
Offline
Wasn't aware of that! Thanks for the comment, but I realized that the $HOME was set inproperly.
echo $HOME would give me /home/name/ but dirs would give me /home/name. Doing export HOME=/home/name worked!
edit: that was a bad idea as I had read before on the wiki so I logged in as root and did usermod -d /home/name properly, this time without the / at the end and it works fine.
Last edited by jonhykrazy (2018-02-16 00:23:52)
Offline