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?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
  • 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 02:42
  • 2
    are you running the terminal as root ? if so, /root is the home directory for root. – Panther Feb 20 '16 at 02:54
  • No, I haven't. It suddenly changed by itself. –  Feb 20 '16 at 03:44
  • Can you post output of `echo $PS1` and `echo $PS2` ? – SHW Feb 20 '16 at 07:55

2 Answers2

0

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/
Usi
  • 153
  • 11
  • 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. –  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.

erik
  • 16,959
  • 4
  • 32
  • 46