Article 5EE5Y Interactive and login shell start with root directory as $PWD

Interactive and login shell start with root directory as $PWD

by
ArchArael
from LinuxQuestions.org on (#5EE5Y)
I have recently switched from Manjaro to Fedora and there is one puzzling issue that has been bothering me.

When I login, or start a terminal emulator, the $PWD is always the root (/) directory.

I have checked the /etc/passwd file and the home directory is correct for my user. The permissions are fine as well. If I run cd I go back to the home directory, so $HOME is set. It is just that every new shell starts in / for some reason.

This issue happens both with the login shell and interactive shell. Changing the terminal emulator does not help. Changing the shell does not solve the issue either. I have tried without any .bashrc .profile .zshrc config files, just the default configuration, and the problem is still there.

Right now I have a 'cd $HOME' line in my .zshrc that kind of fixes the issue but has the drawback that I cannot use Ctrl-Shift-N shortcut to start a new terminal instance in the current directory.

If any of you guys had this issue before how did you fix it? I would really like to understand what is the issue.latest?d=yIl2AUoC8zA latest?i=guN7ZxSUB0Q:F7CYtKPF9l4:F7zBnMy latest?i=guN7ZxSUB0Q:F7CYtKPF9l4:V_sGLiP latest?d=qj6IDK7rITs latest?i=guN7ZxSUB0Q:F7CYtKPF9l4:gIN9vFwguN7ZxSUB0Q
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments