1

By default, every Linux distributions' Terminal I have used so far starts at /home/[username]. For some reason, without noticing, the default folder is now at root in Sabayon.

How do I change the default starting folder in Terminal to be my username folder again?

  • 1
    I don't use any of those, so this is a complete guess -- but did you happen to start your desktop environment from the root directory? Perhaps they all inherited a cwd of / instead of your typical $HOME – Jeff Schaller Feb 20 '16 at 2:42
  • 2
    are you running the terminal as root ? if so, /root is the home directory for root. – Panther Feb 20 '16 at 2:54
  • No, I haven't. It suddenly changed by itself. – gamofe Feb 20 '16 at 3:44
  • Can you post output of echo $PS1 and echo $PS2 ? – SHW Feb 20 '16 at 7:55
1

You can change your initial location to your home by adding

cd ~/

To your ~/.bashrc

You may also need to check that $HOME is set to your actual home directory

export HOME=/home/user_name/
  • The .bashrc file solved it. I don't know why it changed. I hate when these things happen. Maybe it was an update of the system. – gamofe Feb 20 '16 at 12:17
0

Your system probably uses SElinux. And after some system upgrade SElinux has changed some internals or gained new properties. Try

restorecon -r /home

then logout and login again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.