When I start my terminal the current working directory is always "/"
. I want it to start from "/home/<username>"
i.e. my home.
Any solution for this?
When I start my terminal the current working directory is always "/"
. I want it to start from "/home/<username>"
i.e. my home.
Any solution for this?
When you open up a new terminal, the current working directory should be your home folder.
nevon@loltop:~$ echo ${PWD}
/home/nevon
That said, if this is not the case for you, I suppose you could append the following to the end of your .bashrc file:
cd /home/username
If the initial working directory for a terminal is not your home directory you are likely to have a serious configuration problem. Check the following:
grep $USER /etc/passwd # Should show /home/youruser before the shell location
Check your home dir permissions/owner:
ls -ltrd $HOME # You must be the owner
Make sure you are not doing a 'cd' on your shell startup scripts:
~/.profile ~/.bashrc
I would also check the configuration of the user account. Probably the home directory configuration of the user is set to "/"
and not "/home/<username>"
.
I added --working-directory=~/
to the command executed by my keyboard shortcut in order to fix this.